mirror of
https://github.com/davidhalter/parso.git
synced 2026-01-20 10:03:08 +08:00
Add default 'except:' must be last.
This commit is contained in:
@@ -14,3 +14,19 @@ for x in [1]:
|
||||
for x in [1]:
|
||||
break
|
||||
continue
|
||||
|
||||
try:
|
||||
pass
|
||||
except ZeroDivisionError:
|
||||
pass
|
||||
#: E722:0
|
||||
except:
|
||||
pass
|
||||
|
||||
try:
|
||||
pass
|
||||
#: E722:0 E901:0
|
||||
except:
|
||||
pass
|
||||
except ZeroDivisionError:
|
||||
pass
|
||||
|
||||
@@ -70,6 +70,7 @@ def test_indentation_errors(code, positions):
|
||||
'continue',
|
||||
'break',
|
||||
'return',
|
||||
'try: pass\nexcept: pass\nexcept X: pass',
|
||||
|
||||
# IndentationError
|
||||
' foo',
|
||||
|
||||
Reference in New Issue
Block a user