feat: add type hinting on SpanGroup.__iter__ (#12642)

This commit is contained in:
Basile Dura 2023-05-17 14:20:00 +02:00 committed by GitHub
parent df083f91a5
commit 95fd46b1dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,5 @@
from typing import Any, Dict, Iterable, Optional from typing import Any, Dict, Iterable, Iterator, Optional
from .doc import Doc from .doc import Doc
from .span import Span from .span import Span
@ -18,7 +19,7 @@ class SpanGroup:
def doc(self) -> Doc: ... def doc(self) -> Doc: ...
@property @property
def has_overlap(self) -> bool: ... def has_overlap(self) -> bool: ...
def __iter__(self): ... def __iter__(self) -> Iterator[Span]: ...
def __len__(self) -> int: ... def __len__(self) -> int: ...
def append(self, span: Span) -> None: ... def append(self, span: Span) -> None: ...
def extend(self, spans: Iterable[Span]) -> None: ... def extend(self, spans: Iterable[Span]) -> None: ...