mirror of
https://github.com/explosion/spaCy.git
synced 2025-04-04 09:14:12 +03:00
Merge 228045464b
into b3c46c315e
This commit is contained in:
commit
0e0fcbceec
|
@ -28,9 +28,6 @@ from .underscore import Underscore
|
|||
|
||||
DOCBIN_ALL_ATTRS: Tuple[str, ...]
|
||||
|
||||
class DocMethod(Protocol):
|
||||
def __call__(self: Doc, *args: Any, **kwargs: Any) -> Any: ... # type: ignore[misc]
|
||||
|
||||
class Doc:
|
||||
vocab: Vocab
|
||||
mem: Pool
|
||||
|
@ -53,7 +50,7 @@ class Doc:
|
|||
default: Optional[Any] = ...,
|
||||
getter: Optional[Callable[[Doc], Any]] = ...,
|
||||
setter: Optional[Callable[[Doc, Any], None]] = ...,
|
||||
method: Optional[DocMethod] = ...,
|
||||
method: Optional[Callable[[Doc, Any]]] = ...,
|
||||
force: bool = ...,
|
||||
) -> None: ...
|
||||
@classmethod
|
||||
|
@ -61,7 +58,7 @@ class Doc:
|
|||
cls, name: str
|
||||
) -> Tuple[
|
||||
Optional[Any],
|
||||
Optional[DocMethod],
|
||||
Optional[Callable[[Doc, Any]]],
|
||||
Optional[Callable[[Doc], Any]],
|
||||
Optional[Callable[[Doc, Any], None]],
|
||||
]: ...
|
||||
|
@ -72,7 +69,7 @@ class Doc:
|
|||
cls, name: str
|
||||
) -> Tuple[
|
||||
Optional[Any],
|
||||
Optional[DocMethod],
|
||||
Optional[Callable[[Doc, Any]]],
|
||||
Optional[Callable[[Doc], Any]],
|
||||
Optional[Callable[[Doc, Any], None]],
|
||||
]: ...
|
||||
|
|
|
@ -8,9 +8,6 @@ from .doc import Doc
|
|||
from .token import Token
|
||||
from .underscore import Underscore
|
||||
|
||||
class SpanMethod(Protocol):
|
||||
def __call__(self: Span, *args: Any, **kwargs: Any) -> Any: ... # type: ignore[misc]
|
||||
|
||||
class Span:
|
||||
@classmethod
|
||||
def set_extension(
|
||||
|
@ -19,7 +16,7 @@ class Span:
|
|||
default: Optional[Any] = ...,
|
||||
getter: Optional[Callable[[Span], Any]] = ...,
|
||||
setter: Optional[Callable[[Span, Any], None]] = ...,
|
||||
method: Optional[SpanMethod] = ...,
|
||||
method: Optional[Callable[[Span, Any]]] = ...,
|
||||
force: bool = ...,
|
||||
) -> None: ...
|
||||
@classmethod
|
||||
|
@ -27,7 +24,7 @@ class Span:
|
|||
cls, name: str
|
||||
) -> Tuple[
|
||||
Optional[Any],
|
||||
Optional[SpanMethod],
|
||||
Optional[Callable[[Span, Any]]],
|
||||
Optional[Callable[[Span], Any]],
|
||||
Optional[Callable[[Span, Any], None]],
|
||||
]: ...
|
||||
|
@ -38,7 +35,7 @@ class Span:
|
|||
cls, name: str
|
||||
) -> Tuple[
|
||||
Optional[Any],
|
||||
Optional[SpanMethod],
|
||||
Optional[Callable[[Span, Any]]],
|
||||
Optional[Callable[[Span], Any]],
|
||||
Optional[Callable[[Span, Any], None]],
|
||||
]: ...
|
||||
|
|
|
@ -9,9 +9,6 @@ from .morphanalysis import MorphAnalysis
|
|||
from .span import Span
|
||||
from .underscore import Underscore
|
||||
|
||||
class TokenMethod(Protocol):
|
||||
def __call__(self: Token, *args: Any, **kwargs: Any) -> Any: ... # type: ignore[misc]
|
||||
|
||||
class Token:
|
||||
i: int
|
||||
doc: Doc
|
||||
|
@ -23,7 +20,7 @@ class Token:
|
|||
default: Optional[Any] = ...,
|
||||
getter: Optional[Callable[[Token], Any]] = ...,
|
||||
setter: Optional[Callable[[Token, Any], None]] = ...,
|
||||
method: Optional[TokenMethod] = ...,
|
||||
method: Optional[Callable[[Token, Any]]] = ...,
|
||||
force: bool = ...,
|
||||
) -> None: ...
|
||||
@classmethod
|
||||
|
@ -31,7 +28,7 @@ class Token:
|
|||
cls, name: str
|
||||
) -> Tuple[
|
||||
Optional[Any],
|
||||
Optional[TokenMethod],
|
||||
Optional[Callable[[Token, Any]]],
|
||||
Optional[Callable[[Token], Any]],
|
||||
Optional[Callable[[Token, Any], None]],
|
||||
]: ...
|
||||
|
@ -42,7 +39,7 @@ class Token:
|
|||
cls, name: str
|
||||
) -> Tuple[
|
||||
Optional[Any],
|
||||
Optional[TokenMethod],
|
||||
Optional[Callable[[Token, Any]]],
|
||||
Optional[Callable[[Token], Any]],
|
||||
Optional[Callable[[Token, Any], None]],
|
||||
]: ...
|
||||
|
|
Loading…
Reference in New Issue
Block a user