summaryrefslogtreecommitdiff
path: root/sphinx/util/typing.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/util/typing.py')
-rw-r--r--sphinx/util/typing.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/sphinx/util/typing.py b/sphinx/util/typing.py
index 430d22d16..b7c389147 100644
--- a/sphinx/util/typing.py
+++ b/sphinx/util/typing.py
@@ -70,7 +70,9 @@ InventoryItem = Tuple[str, str, str, str]
Inventory = Dict[str, Dict[str, InventoryItem]]
-def get_type_hints(obj: Any, globalns: Dict = None, localns: Dict = None) -> Dict[str, Any]:
+def get_type_hints(
+ obj: Any, globalns: Optional[Dict[str, Any]] = None, localns: Optional[Dict] = None
+) -> Dict[str, Any]:
"""Return a dictionary containing type hints for a function, method, module or class object.
This is a simple wrapper of `typing.get_type_hints()` that does not raise an error on