Undefined name: 'ast_options' in scripts/make_ast_classes.py
See original GitHub issueFixed in #2011
$ flake8 --select=E9,F63,F7,F82 --show-source scripts/make_ast_classes.py
scripts/make_ast_classes.py:33:47: F821 undefined name 'ast_options'
ast_types[ast_type] = {'options': ast_options}
^
Issue Analytics
- State:
- Created a year ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
function name is undefined in python class - Stack Overflow
I am relatively new to python and i am experiencing some issues with namespacing. class a: def abc(self): print "haha" def ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If there is a change to the logic, the program will fail, and the devoloper will fix the bug…
I will accept the PR, but I am not pleased to have to change valid Python code only because a style guide enforces it.
Yes, the current logic prevents the undefined variable situation but what happens if there is a change to the logic? A compiler would enforce the same safeguards as
flake8
as a precaution against breakage in future code changes.