/snap/core24/1643/usr/lib/python3.12/test/typinganndata
NameSizeModeActions
__pycache__/-0755rm
ann_module.py11200644editdlrm
ann_module2.py5190644editdlrm
ann_module3.py4480644editdlrm
ann_module4.py810644editdlrm
ann_module5.py2020644editdlrm
ann_module6.py1380644editdlrm
ann_module7.py2950644editdlrm
ann_module8.py1770644editdlrm
ann_module9.py2800644editdlrm
mod_generics_cache.py5080644editdlrm
_typed_dict_helper.py8590644editdlrm
__init__.py00644editdlrm
Edit: /snap/core24/1643/usr/lib/python3.12/test/typinganndata/ann_module3.py (448B)
""" Correct syntax for variable annotation that should fail at runtime in a certain manner. More examples are in test_grammar and test_parser. """ def f_bad_ann(): __annotations__[1] = 2 class C_OK: def __init__(self, x: int) -> None: self.x: no_such_name = x # This one is OK as proposed by Guido class D_bad_ann: def __init__(self, x: int) -> None: sfel.y: int = 0 def g_bad_ann(): no_such_name.attr: int = 0