mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-10 16:22:29 +03:00
fix: InitializableComponent type hints
This commit is contained in:
parent
c936db2faf
commit
1bcb1f7908
|
@ -1,5 +1,7 @@
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
from typing import Optional, Any, Iterable, Dict, Callable, Sequence, List
|
from typing import Optional, Any, Iterable, Dict, Callable, Sequence, List
|
||||||
|
|
||||||
|
from spacy.language import Language
|
||||||
from .compat import Protocol, runtime_checkable
|
from .compat import Protocol, runtime_checkable
|
||||||
|
|
||||||
from thinc.api import Optimizer, Model
|
from thinc.api import Optimizer, Model
|
||||||
|
@ -32,7 +34,7 @@ class InitializableComponent(Protocol):
|
||||||
def initialize(
|
def initialize(
|
||||||
self,
|
self,
|
||||||
get_examples: Callable[[], Iterable["Example"]],
|
get_examples: Callable[[], Iterable["Example"]],
|
||||||
nlp: Iterable["Example"],
|
nlp: Language,
|
||||||
**kwargs: Any
|
**kwargs: Any
|
||||||
):
|
):
|
||||||
...
|
...
|
||||||
|
|
Loading…
Reference in New Issue
Block a user