-
- Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Closed
Copy link
Labels
AstroidRelated to astroidRelated to astroidNeeds PRThis issue is accepted, sufficiently specified and now needs an implementationThis issue is accepted, sufficiently specified and now needs an implementationpython 3.11
Milestone
Description
Bug description
hello.py
# pylint: disable=missing-module-docstring eg = ExceptionGroup("Hello", [Exception("A"), Exception("B")]) for e in eg.exceptions: print(e)Configuration
No response
Command used
pylint hello.pyPylint output
************* Module hello hello.py:3:9: E1133: Non-iterable value eg.exceptions is used in an iterating context (not-an-iterable)Expected behavior
I would expect pylint to accept this code as correct. ExceptionGroup.exceptions is a tuple, which is an iterable type.
If I run the code with python hello.py, I get no errors and the messages of the two exception instances:
$ python hello.py A BPylint version
pylint 2.17.5 astroid 2.15.6 Python 3.11.4 (main, Jun 16 2023, 10:32:21) [GCC 11.3.0]OS / Environment
Ubuntu 22.04
Additional dependencies
astroid==2.15.6 dill==0.3.7 isort==5.12.0 lazy-object-proxy==1.9.0 mccabe==0.7.0 platformdirs==3.10.0 pylint==2.17.5 tomlkit==0.12.1 wrapt==1.15.0 semsorock, darhsu, jnsnow and josmithua
Metadata
Metadata
Assignees
Labels
AstroidRelated to astroidRelated to astroidNeeds PRThis issue is accepted, sufficiently specified and now needs an implementationThis issue is accepted, sufficiently specified and now needs an implementationpython 3.11