mirror of
https://github.com/davidhalter/parso.git
synced 2026-11-01 09:16:21 +08:00
Fix another small issue with global/nonlocal names.
This commit is contained in:
1 parent
2420f57a5c
commit
443cb1ce08
2 files changed
+16
-6
No files matched your search
@@ -202,16 +202,25 @@ def test_indentation_errors(code, positions):
|
||||
def glob():
|
||||
global x
|
||||
x: foo = 3
|
||||
'''),
|
||||
'''),
|
||||
# global/nonlocal + param
|
||||
dedent('''
|
||||
def glob(x):
|
||||
global x
|
||||
'''),
|
||||
'''),
|
||||
dedent('''
|
||||
def glob(x):
|
||||
nonlocal x
|
||||
'''),
|
||||
'''),
|
||||
dedent('''
|
||||
def x():
|
||||
a =3
|
||||
def z():
|
||||
nonlocal a
|
||||
a = 3
|
||||
nonlocal a
|
||||
'''),
|
||||
|
||||
|
||||
# IndentationError
|
||||
' foo',
|
||||
|
||||
Reference in new issue
Block a user