Skip to content

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

@ZivRonen

Description

@ZivRonen

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

Metadata

Metadata

Labels

Needs astroid updateNeeds an astroid update (probably a release too) before being mergableRegression

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions