Improve typing of Chapters constructor

This commit is contained in:
rlaphoenix 2024-02-10 12:47:14 +00:00
parent 92e00ed667
commit 8bf6e4d87e
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ OGM_SIMPLE_LINE_2_FORMAT = re.compile(r"^CHAPTER(?P<number>\d+)NAME=(?P<name>.*)
class Chapters(SortedKeyList, ABC):
def __init__(self, iterable: Optional[Iterable] = None):
def __init__(self, iterable: Optional[Iterable[Chapter]] = None):
super().__init__(key=lambda x: x.timestamp or 0)
for chapter in iterable or []:
self.add(chapter)