-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
Undefined name: 'commandline' --> 'cmd' #13038
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
Conversation
The ___undefined variable___ __commandline__ is used but is never defined. __cmd__ is defined on line 1529 and is used on 1534. @ned-deily Your review please. [flake8](http://flake8.pycqa.org) testing of https://github.com/python/cpython on Python 3.7.1 $ __flake8 . --count --select=E9,F63,F72,F82 --show-source --statistics__ ``` ./Mac/BuildScript/build-installer.py:1272:17: F821 undefined name 'build_time_vars' for k, v in build_time_vars.items(): ^ ./Mac/BuildScript/build-installer.py:1543:50: F821 undefined name 'commandline' raise RuntimeError("command failed: %s"%(commandline,)) ^ ``` __E901,E999,F821,F822,F823__ are the "_showstopper_" [flake8](http://flake8.pycqa.org) issues that can halt the runtime with a SyntaxError, NameError, etc. These 5 are different from most other flake8 issues which are merely "style violations" -- useful for readability but they do not effect runtime safety. * F821: undefined name `name` * F822: undefined name `name` in `__all__` * F823: local variable name referenced before assignment * E901: SyntaxError or IndentationError * E999: SyntaxError -- failed to compile a file into an Abstract Syntax Tree
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for finding this, @cclauss!
Thanks @cclauss for the PR, and @ned-deily for merging it 🌮🎉.. I'm working now to backport this PR to: 2.7, 3.7. |
) (cherry picked from commit d337169) Co-authored-by: cclauss <cclauss@me.com>
GH-13766 is a backport of this pull request to the 3.7 branch. |
GH-13767 is a backport of this pull request to the 2.7 branch. |
) (cherry picked from commit d337169) Co-authored-by: cclauss <cclauss@me.com>
(cherry picked from commit d337169) Co-authored-by: cclauss <cclauss@me.com>
(cherry picked from commit d337169) Co-authored-by: cclauss <cclauss@me.com>
The undefined variable commandline is used but is never defined. cmd is defined on line 1529 and is used on 1534. @ned-deily Your review please.
flake8 testing of https://github.com/python/cpython on Python 3.7.1
$ flake8 . --count --select=E9,F63,F72,F82 --show-source --statistics
E901,E999,F821,F822,F823 are the "showstopper" flake8 issues that can halt the runtime with a SyntaxError, NameError, etc. These 5 are different from most other flake8 issues which are merely "style violations" -- useful for readability but they do not effect runtime safety.
name
name
in__all__