Files
openide/python/testData/psi/VariableAnnotations.py
Mikhail Golubev 3266460142 PY-20744 Parse PEP-526 variable annotations
Annotation is preserved at the level of assignment nodes similar to
where CPython keeps them in its AST (in special "augassign" nodes).
For type annotations in form "x: int" without variable initialization
special statement PyTypeDefinitionStatement was introduced.
2016-09-16 08:16:26 +03:00

9 lines
128 B
Python

class C:
x: int
y: None = 42
def m(self, d):
x: List[bool]
d['foo']: str
(d['bar']): float