From 9d3e3e6be2658b046de5691343ed8cc2b7968e69 Mon Sep 17 00:00:00 2001 From: Paul O'Leary McCann Date: Tue, 31 Jan 2023 12:46:06 +0900 Subject: [PATCH] Add types to _deep_get --- spacy/cli/configure.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spacy/cli/configure.py b/spacy/cli/configure.py index 7db39973a..488978827 100644 --- a/spacy/cli/configure.py +++ b/spacy/cli/configure.py @@ -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. """