We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7e7223e commit 626d706Copy full SHA for 626d706
Lib/annotationlib.py
@@ -685,11 +685,9 @@ def get_annotations(
685
case Format.FORWARDREF:
686
# For FORWARDREF, we use __annotations__ if it exists
687
try:
688
- ann = _get_dunder_annotations(obj)
+ return dict(_get_dunder_annotations(obj))
689
except NameError:
690
pass
691
- else:
692
- return dict(ann)
693
694
# But if __annotations__ threw a NameError, we try calling __annotate__
695
ann = _get_and_call_annotate(obj, format)
0 commit comments