Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Undefined name: 'ast_options' in scripts/

See original GitHub issue

Fixed in #2011

$ flake8 --select=E9,F63,F7,F82 --show-source scripts/

scripts/ F821 undefined name 'ast_options'
            ast_types[ast_type] = {'options': ast_options}

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

PierreQuentelcommented, Aug 31, 2022

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.

cclausscommented, Aug 31, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found