Skip to content
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

fail to find NameError in for loop expression_list #498

Closed
pylint-bot opened this issue Mar 20, 2015 · 0 comments
Closed

fail to find NameError in for loop expression_list #498

pylint-bot opened this issue Mar 20, 2015 · 0 comments
Labels
Bug 🪲 Checkers Related to a checker

Comments

@pylint-bot
Copy link

Originally reported by: BitBucket: hacman, GitHub: @hacman?


the following code is not caught by pylint. obviously, x will be a NameError at runtime.

for x in x:
pass

if the loop variable is different, then pylint properly catches a name error. e.g., the following is caught by pylint (undefined-variable as expected):

for i in L:
pass

I hope this report was helpful. Thanks for pylint! It makes my life so much easier.


@pylint-bot pylint-bot added Bug 🪲 Checkers Related to a checker labels Dec 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🪲 Checkers Related to a checker
Projects
None yet
Development

No branches or pull requests

1 participant