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

pylint 3.2.0 causes false-positive E1133 (not-an-iterable) error in packages with .pyi stubs #9626

Closed
ZivRonen opened this issue May 15, 2024 · 6 comments · Fixed by #9632
Closed
Assignees
Labels
Needs astroid update Needs an astroid update (probably a release too) before being mergable Regression
Milestone

Comments

@ZivRonen
Copy link

Bug description

"""Show pylint not-an-iterable issue with more-itertools. Pylint: 3.2.0, more-itertools: 1.20.0"""
import more_itertools

for val in more_itertools.chunked([1, 2, 3], n=1):
    print(val)

Configuration

No response

Command used

pylint test.py

Pylint output

************* Module test
test.py:4:11: E1133: Non-iterable value more_itertools.chunked([1, 2, 3], n=1) is used in an iterating context (not-an-iterable)

------------------------------------------------------------------
Your code has been rated at 0.00/10 (previous run: 0.00/10, +0.00)

Expected behavior


Your code has been rated at 10.00/10 (previous run: 0.00/10, +10.00)

Pylint version

pylint 3.2.0
astroid 3.2.0
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux

OS / Environment

No response

Additional dependencies

more-itertools==1.20.0
@ZivRonen ZivRonen added the Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling label May 15, 2024
@jacobtylerwalls
Copy link
Member

Thanks for the report. Caused in pylint-dev/astroid#2375, which we may need to revert.

@jacobtylerwalls jacobtylerwalls added Regression Needs astroid update Needs an astroid update (probably a release too) before being mergable and removed Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling labels May 15, 2024
@jacobtylerwalls jacobtylerwalls changed the title pylint 3.2.0 causes false-positive E1133 (not-an-iterable) error on many of more-itertools functions return values pylint 3.2.0 causes false-positive E1133 (not-an-iterable) error in packages with .pyi stubs May 15, 2024
@jacobtylerwalls
Copy link
Member

Planning to get patch releases of astroid and pylint out in the next few days. This should have been guarded under an experimental feature flag.

@ZivRonen
Copy link
Author

Ok, thank you very much 👍
Is it grouped under another issue? Should I close this one?

@jacobtylerwalls
Copy link
Member

Let's leave it open so that it's discoverable until we get the patches out.

@ZivRonen
Copy link
Author

Fixed by astroid version 3.2.1

@Pierre-Sassoulas
Copy link
Member

If you have pylint 3.2.0 you need to upgrade astroid (pip install astroid -U) or wait for pylint 3.2.1 to be released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs astroid update Needs an astroid update (probably a release too) before being mergable Regression
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants