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

unused-argument false-positive with overshadowed variable in dictionary comprehension #1731

Closed
bokhi opened this issue Nov 10, 2017 · 2 comments
Labels

Comments

@bokhi
Copy link

bokhi commented Nov 10, 2017

Steps to reproduce

def metadata_from_dict(key):
    return {key: str(value) for key, value in key.items()}

Current behavior

W:  1,23: Unused argument 'key' (unused-argument)

Expected behavior

should not raise unused-argument

pylint --version output

pylint 1.7.4,
astroid 1.5.3
Python 3.6.2 (default, Jul 17 2017, 23:14:31)
[GCC 5.4.0 20160609]

@PCManticore
Copy link
Contributor

Thanks for the issue @bokhi This makes sense.

@brycepg
Copy link
Contributor

brycepg commented Mar 4, 2018

Looks like @hippo91 fixed this in pylint 1.8.2 ! Closing

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

3 participants