mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-10 16:22:29 +03:00
Add types to _deep_get
This commit is contained in:
parent
3fe723c1f9
commit
9d3e3e6be2
|
@ -3,6 +3,7 @@ import re
|
|||
from wasabi import msg
|
||||
import typer
|
||||
from thinc.api import Config
|
||||
from typing import Any, Dict, Iterable
|
||||
|
||||
import spacy
|
||||
from spacy.language import Language
|
||||
|
@ -22,7 +23,7 @@ LISTENER_ARCHS = [
|
|||
]
|
||||
|
||||
|
||||
def _deep_get(obj, key, default):
|
||||
def _deep_get(obj: Dict[str, Any], key: Iterable[str], default: Any):
|
||||
"""Given a multi-part key, try to get the key. If at any point this isn't
|
||||
possible, return the default.
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user