mirror of
https://github.com/davidhalter/parso.git
synced 2026-01-01 09:03:39 +08:00
Some issues regarding annotations.
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user