Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Lib/annotationlib.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -939,6 +939,7 @@ def get_annotations(
if not eval_str: if not eval_str:
return dict(ann) return dict(ann)


if globals is None or locals is None:
if isinstance(obj, type): if isinstance(obj, type):
# class # class
obj_globals = None obj_globals = None
Expand Down
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,2 @@
Only fetch globals and locals if necessary in
:func:`annotationlib.get_annotations`
Loading