-
Notifications
You must be signed in to change notification settings - Fork 63
Overriding imports gives incorrect error #20
Comments
I understand why this is misleading, but at the time of parsing line 4, The primary error is for the redefinition, and really unrelated to weather or not |
I don't quite follow your logic, sorry. Consider this code:
At time of parsing line 1, (I certainly agree that "'pickle' imported but unused" is not an improvement, and it should be "redefinition of 'pickle' from line 2") |
I can understand why the error would come up, but this is a really common pattern. Isn't there any way you can recognize it and ignore it? |
Hm, pylint sensibly accepts something like:
Perhaps the same logic could be extended to the try/except, since given:
|
The following code:
Gives the following error:
foo.py:4: redefinition of unused 'pickle' from line 2
. However, it is actually used.Expected error would be "'pickle' imported but unused" or perhaps something like "redefinition of 'pickle' from line 2"
The text was updated successfully, but these errors were encountered: