summaryrefslogtreecommitdiff
path: root/sphinx/util/typing.py
diff options
context:
space:
mode:
authorAdam Turner <9087854+aa-turner@users.noreply.github.com>2022-07-18 22:49:56 +0100
committerAdam Turner <9087854+aa-turner@users.noreply.github.com>2022-07-18 22:49:56 +0100
commit94024e6efaa23869a6141dba05118c158d3d3f8f (patch)
tree1bfccc5447ca099627c4c31f536d7082b7b9eb6a /sphinx/util/typing.py
parenta4d41aa889388bf8ee2815d4819235b5ca978a8d (diff)
parenteb0a6c574fd18d5c5d903e5d07cba8cafc376ee0 (diff)
downloadsphinx-git-94024e6efaa23869a6141dba05118c158d3d3f8f.tar.gz
Merge branch '5.x'
# Conflicts: # sphinx/ext/autodoc/__init__.py # sphinx/writers/html5.py
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