mirror of https://github.com/explosion/spaCy.git
feat: add type hinting on SpanGroup.__iter__ (#12642)
This commit is contained in:
parent
df083f91a5
commit
95fd46b1dd
|
@ -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: ...
|
||||||
|
|
Loading…
Reference in New Issue