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

W0611 unused-import false positive #3445

Closed
teake opened this issue Mar 17, 2020 · 1 comment
Closed

W0611 unused-import false positive #3445

teake opened this issue Mar 17, 2020 · 1 comment
Labels

Comments

@teake
Copy link

teake commented Mar 17, 2020

This one seems related to #3444.

Steps to reproduce

  1. Make a Python file (w0611.py) with the following content:
from os import environ

for k, v in environ.items():
    print(k, v)

  1. Run pylint --disable=all --enable=W0611 w0611.py

Current behavior

Output:

************* Module w0611
w0611.py:1:0: W0611: Unused environ imported from os (unused-import)

-------------------------------------------------------------------
Your code has been rated at 6.67/10 (previous run: 10.00/10, -3.33)

Expected behavior

That W0611 isn't raised.

pylint --version output

This is on the master version of both pylint and astroid at the time of writing.

pylint 2.5.0-dev1
astroid 2.4.0
Python 3.7.6 | packaged by conda-forge | (default, Mar  5 2020, 15:03:29) 
[Clang 9.0.1 ]
@teake
Copy link
Author

teake commented Mar 25, 2020

Thanks! 💪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants