-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
global/local syntax errors not caught #249
Labels
Comments
Just hit the nonlocal one. Would definitely be nice if pyflakes properly warned about these. |
seeeturtle
added a commit
to seeeturtle/pyflakes
that referenced
this issue
Jan 17, 2018
seeeturtle
added a commit
to seeeturtle/pyflakes
that referenced
this issue
Jan 17, 2018
seeeturtle
added a commit
to seeeturtle/pyflakes
that referenced
this issue
Jan 17, 2018
When we use undefined name declared by global statement, pyflakes should catch the error but it doesn't. This will fix pyflakes to catch this error. Check test_undefined_globa Fixes PyCQA#249
seeeturtle
added a commit
to seeeturtle/pyflakes
that referenced
this issue
Jan 17, 2018
When we use undefined name declared by global statement, pyflakes should catch the error but it doesn't. This will fix pyflakes to catch this error. Check test_undefined_globa Fixes PyCQA#249
Another related one is $ cat test2.py
def test():
a = 2
nonlocal a
$ python test2.py
File "test2.py", line 3
nonlocal a
^
SyntaxError: name 'a' is assigned to before nonlocal declaration
$ pyflakes test2.py # no errors |
This comment has been minimized.
This comment has been minimized.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Original report by asmeurer (@asmeurer?) on Launchpad:
This is perhaps a bit obscure, but here's a class of syntax errors that aren't caught by pyflakes
I'm unsure what the full set of possible errors are here. One would need to check the Python source. I know there are some others relating to the Python 3 "nonlocal" keyword as well.
The text was updated successfully, but these errors were encountered: