mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-10 00:02:19 +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 Optional, Any, Iterable, Dict, Callable, Sequence, List
|
||||
|
||||
from spacy.language import Language
|
||||
from .compat import Protocol, runtime_checkable
|
||||
|
||||
from thinc.api import Optimizer, Model
|
||||
|
@ -32,7 +34,7 @@ class InitializableComponent(Protocol):
|
|||
def initialize(
|
||||
self,
|
||||
get_examples: Callable[[], Iterable["Example"]],
|
||||
nlp: Iterable["Example"],
|
||||
nlp: Language,
|
||||
**kwargs: Any
|
||||
):
|
||||
...
|
||||
|
|
Loading…
Reference in New Issue
Block a user