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

Fix false positive when zip() receives iterable #4105

Merged

Conversation

tiagohonorato
Copy link
Contributor

Steps

  • Add a ChangeLog entry describing what your PR does.
  • If it's a new feature or an important bug fix, add a What's New entry in doc/whatsnew/<current release.rst>.
  • Write a good description on what the PR does.

Description

Similarly to #4104, something like list(zip(range, ...)) should not issue range-builtin-not-iterating when using iterable arguments. As a result, this PR adds tests and the changes required do consider zip() as an iterating context.

Type of Changes

Type
🐛 Bug fix
✨ New feature
🔨 Refactoring
📜 Docs

Related Issue

#4078

Since zip() supports iterables, it should not issue
builtin-not-iterating for iterable arguments.

Signed-off-by: Tiago Honorato <tiagohonorato1@gmail.com>
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.02%) to 90.566% when pulling 9ce1f37 on tiagohonorato:zip-as-iterating-context into 4faccd0 on PyCQA:master.

@coveralls
Copy link

coveralls commented Feb 18, 2021

Coverage Status

Coverage remained the same at 90.602% when pulling 8c17a35 on tiagohonorato:zip-as-iterating-context into f9b2227 on PyCQA:master.

@Pierre-Sassoulas Pierre-Sassoulas added the False Positive 🦟 A message is emitted but nothing is wrong with the code label Feb 19, 2021
@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.7.0 milestone Feb 19, 2021
@Pierre-Sassoulas Pierre-Sassoulas merged commit bad6eec into pylint-dev:master Feb 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
False Positive 🦟 A message is emitted but nothing is wrong with the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants