Adds support for SETUP_ANNOTATION op and variable annotations
Tests have also been added. Fixes #169
This commit is contained in:
BIN
tests/compiled/variable_annotations.3.8.pyc
Normal file
BIN
tests/compiled/variable_annotations.3.8.pyc
Normal file
Binary file not shown.
8
tests/input/variable_annotations.py
Normal file
8
tests/input/variable_annotations.py
Normal file
@@ -0,0 +1,8 @@
|
||||
a: int
|
||||
b
|
||||
c = 'no annotation'
|
||||
x: int = 10
|
||||
y: str = 'annotation'
|
||||
z: tuple = (1, 2, 3)
|
||||
confirm_subscr = {}
|
||||
confirm_subscr['test'] = 'works'
|
8
tests/tokenized/variable_annotations.txt
Normal file
8
tests/tokenized/variable_annotations.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
a : int <EOL>
|
||||
b <EOL>
|
||||
c = 'no annotation' <EOL>
|
||||
x : int = 10 <EOL>
|
||||
y : str = 'annotation' <EOL>
|
||||
z : tuple = ( 1 , 2 , 3 ) <EOL>
|
||||
confirm_subscr = { } <EOL>
|
||||
confirm_subscr [ 'test' ] = 'works' <EOL>
|
Reference in New Issue
Block a user