-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Closed
Copy link
Labels
False Positive 🦟A message is emitted but nothing is wrong with the codeA message is emitted but nothing is wrong with the code
Milestone
Description
Bug description
Here is some code triggering the issue:
"""Main module"""
def main() -> None:
"""Main program"""
exc_group = ExceptionGroup('message', [RuntimeError('oops')])
print(type(exc_group.exceptions)) # <class 'tuple'>
exc = exc_group.exceptions[0] # E1136 is triggered here
print(exc) # oops
if __name__ == '__main__':
main()Configuration
Command used
pylint .Pylint output
************* Module unsubscriptable
unsubscriptable.py:7:10: E1136: Value 'exc_group.exceptions' is unsubscriptable (unsubscriptable-object)Expected behavior
Since exc_group.exceptions is a tuple, I should not get this warning.
Pylint version
pylint 3.3.8
astroid 3.3.11
Python 3.11.2 (main, Apr 28 2025, 14:11:48) [GCC 12.2.0]OS / Environment
Debian bookworm
Additional dependencies
Metadata
Metadata
Assignees
Labels
False Positive 🦟A message is emitted but nothing is wrong with the codeA message is emitted but nothing is wrong with the code