summaryrefslogtreecommitdiff
path: root/Lib/typing.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/typing.py')
-rw-r--r--Lib/typing.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/typing.py b/Lib/typing.py
index d409517ff5..ff964343c5 100644
--- a/Lib/typing.py
+++ b/Lib/typing.py
@@ -1677,6 +1677,8 @@ def get_type_hints(obj, globalns=None, localns=None, include_extras=False):
else:
base_globals = globalns
ann = base.__dict__.get('__annotations__', {})
+ if isinstance(ann, types.GetSetDescriptorType):
+ ann = {}
base_locals = dict(vars(base)) if localns is None else localns
if localns is None and globalns is None:
# This is surprising, but required. Before Python 3.10,