Some issues regarding annotations.

This commit is contained in:
Dave Halter
2017-07-25 00:38:27 +02:00
parent 319a0cc56f
commit 6085c91df1
3 changed files with 61 additions and 0 deletions

View File

@@ -9,6 +9,12 @@ from __future__ import division
''r''u''
b'' BR''
foo: int = 4
(foo): int = 3
((foo)): int = 3
foo.bar: int
foo[3]: int
for x in [1]:
try:
continue # Only the other continue and pass is an error.

View File

@@ -79,6 +79,17 @@ def test_indentation_errors(code, positions):
#'(True,) = x',
#'([False], a) = x',
#'__debug__ = 1'
# Mostly 3.6 relevant
'[]: int',
'[a, b]: int',
'(): int',
'(()): int',
'((())): int',
'{}: int',
'True: int',
'(a, b): int',
'*star,: int',
'a, b: int = 3',
# IndentationError
' foo',