Conversation
|
Note this also corrects handling of |
| if isinstance(scope, GeneratorScope): | ||
| scope = self.scopeStack[-2] | ||
| for binding in scope.values(): | ||
| binding.used = (self.scope, node) |
There was a problem hiding this comment.
this could be changed to
if not binding.used:
binding.used = (self.scope, node)
Then at the end of the scope, any bindings used only by locals() could be a different type of message.
See #333 (comment)
|
IMHO Having it warn but as a distinct error message that could be silenced by flake8 or whatever seems like the best solution. |
|
I agree that I would prefer to tackle that new error report in a separate PR, and limit this one to only correct reporting of |
|
What exactly is the import * change you are referring to? Did that behavior change recently? |
|
No, I am referring to 1.1.0 change, 0532189 |
|
I see. I tested master and it sill warns about everything with import *, but sometimes has a better error message. Does this do the same thing for locals? The test makes it look like there are exceptions for locals, where using |
Fixes #136
Fixes #333