/snap/core22/2437/usr/lib/python3.10/test
NameSizeModeActions
libregrtest/-0755rm
support/-0755rm
__pycache__/-0755rm
ann_module.py11200644editdlrm
ann_module2.py5190644editdlrm
ann_module3.py4480644editdlrm
regrtest.py12940755editdlrm
test_support.py259420644editdlrm
__init__.py470644editdlrm
__main__.py410644editdlrm
Edit: /snap/core22/2437/usr/lib/python3.10/test/ann_module2.py (519B)
""" Some correct syntax for variable annotation here. More examples are in test_grammar and test_parser. """ from typing import no_type_check, ClassVar i: int = 1 j: int x: float = i/10 def f(): class C: ... return C() f().new_attr: object = object() class C: def __init__(self, x: int) -> None: self.x = x c = C(5) c.new_attr: int = 10 __annotations__ = {} @no_type_check class NTC: def meth(self, param: complex) -> None: ... class CV: var: ClassVar['CV'] CV.var = CV()