Comment 7 for bug 1507216

Revision history for this message
John Vandenberg (jayvdb) wrote :

> The closest precedent for complaining about locals() might be that
> pyflakes complains about "import *"

This, and the pep257 warning regarding `__all__` being mutable, was the reason I raised this issue.
The pyflakes rule regarding unused variable is currently being silently repressed when locals() is used.

Both mean that static analysis in not possible by the tool with its current design/limitations.

I can appreciate the scope is different, module vs function, but then pyflakes is making a decision on the importance of a rule based on the scope. When a module is mostly a large main(), the scope is irrelevant.