mirror of
https://github.com/davidhalter/parso.git
synced 2026-01-27 13:22:28 +08:00
Add issue 'nonlocal declaration not allowed at module level'
This commit is contained in:
@@ -45,3 +45,7 @@ except:
|
||||
pass
|
||||
except ZeroDivisionError:
|
||||
pass
|
||||
|
||||
|
||||
class X():
|
||||
nonlocal a
|
||||
|
||||
@@ -105,6 +105,7 @@ def test_indentation_errors(code, positions):
|
||||
# SyntaxErrors from Python/symtable.c
|
||||
'def f(x, x): pass',
|
||||
'def x(): from math import *',
|
||||
'nonlocal a',
|
||||
|
||||
# IndentationError
|
||||
' foo',
|
||||
|
||||
Reference in New Issue
Block a user