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

False positive builtin-not-iterating when using map() #4078

Closed
tiagohonorato opened this issue Feb 8, 2021 · 0 comments · Fixed by #4104, tingvarsson/telegram.ongabot#33 or hypothesis/checkmate#227
Labels
False Negative 🦋 No message is emitted but something is wrong with the code Good first issue Friendly and approachable by new contributors

Comments

@tiagohonorato
Copy link
Contributor

Steps to reproduce

Run pylint with --py3k over the following example:

for _ in map(str, range(5)):
	pass

Current behavior

W1638: range built-in referenced when not iterating (range-builtin-not-iterating)

Expected behavior

No error as map allows iterable.

pylint --version output

$ pylint --version
pylint 2.6.0
astroid 2.4.2
Python 3.8.7 (default, Jan 20 2021, 00:00:00) 
[GCC 10.2.1 20201125 (Red Hat 10.2.1-9)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
False Negative 🦋 No message is emitted but something is wrong with the code Good first issue Friendly and approachable by new contributors
Projects
None yet
2 participants