8000
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.
__annotations__
1 parent 0e4cf9c commit 43185fbCopy full SHA for 43185fb
Lib/test/test_annotationlib.py
@@ -809,6 +809,24 @@ def f(x: int):
809
{"x": "int"},
810
)
811
812
+ def test_del_annotations(self):
813
+ # gh-132285
814
+ called = False
815
+ class A:
816
+ def __annotate__(format):
817
+ nonlocal called
818
+ called = True
819
+ return {'a': int}
820
+
821
+ self.assertEqual(A.__annotations__, {'a': int})
822
+ self.assertTrue(called)
823
824
+ del A.__annotations__
825
826
827
828
829
830
def test_non_dict_annotations(self):
831
class WeirdAnnotations:
832
@property
0 commit comments