We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 76408fd commit c5699a8Copy full SHA for c5699a8
1 file changed
tests/test_pytypes.py
@@ -1146,7 +1146,10 @@ def get_annotations_helper(o):
1146
if sys.version_info >= (3, 14):
1147
import annotationlib
1148
1149
- return annotationlib.get_annotations(o)
+ try:
1150
+ return annotationlib.get_annotations(o) or None
1151
+ except TypeError:
1152
+ return None
1153
if isinstance(o, type):
1154
return o.__dict__.get("__annotations__", None)
1155
return getattr(o, "__annotations__", None)
0 commit comments