mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-14 18:05:27 +07:00
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.
9 lines
128 B
Python
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
|