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

Incorrect unused-import message #2928

Closed
andreymal opened this issue May 21, 2019 · 1 comment
Closed

Incorrect unused-import message #2928

andreymal opened this issue May 21, 2019 · 1 comment
Labels

Comments

@andreymal
Copy link

def test1(s):
    from six import PY2, text_type
    return s.encode("utf-8") if PY2 else s

Current behavior

pylint_wat.py:2:4: W0611: Unused PY2 imported from six (unused-import)

Expected behavior

pylint_wat.py:2:4: W0611: Unused text_type imported from six (unused-import)

pylint --version output

pylint 2.3.1
astroid 2.2.5
Python 3.6.5 (default, Apr  1 2018, 05:46:30) 
[GCC 7.3.0]
@andreymal andreymal changed the title False positive: Incorrect unused-import message May 21, 2019
@PCManticore
Copy link
Contributor

Thank you, I can reproduce the issue.

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