Skip to content

Conversation

mbyrnepr2
Copy link
Member

Type of Changes

Type
βœ“ πŸ› Bug fix
✨ New feature
πŸ”¨ Refactoring
πŸ“œ Docs

Description

Fix a false positive for not-an-iterable in an ExceptionGroupcontext.

Refs #XXXX

Closes pylint-dev/pylint#8985
Closes pylint-dev/pylint#10558

@mbyrnepr2
Copy link
Member Author

I'm never terribly confident when touching the astroid codebase but it seems to fix the issue at least!

Copy link

codecov bot commented Sep 23, 2025

Codecov Report

βœ… All modified and coverable lines are covered by tests.
βœ… Project coverage is 93.36%. Comparing base (e3f5fb5) to head (5a25567).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2830   +/-   ##
=======================================
  Coverage   93.35%   93.36%           
=======================================
  Files          91       91           
  Lines       11113    11119    +6     
=======================================
+ Hits        10375    10381    +6     
  Misses        738      738           
Flag Coverage Ξ”
linux 93.22% <100.00%> (+<0.01%) ⬆️
pypy 93.36% <100.00%> (+<0.01%) ⬆️
windows 93.34% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Ξ”
astroid/interpreter/objectmodel.py 96.26% <100.00%> (+0.03%) ⬆️

... and 1 file with indirect coverage changes

πŸš€ New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Pierre-Sassoulas Pierre-Sassoulas marked this pull request as ready for review September 23, 2025 15:49
Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not terribly confident when reviewing astroid, but... LGTM :)

Co-authored-by: Pierre Sassoulas <[email protected]>
DanielNoord
DanielNoord previously approved these changes Sep 23, 2025
Copy link
Collaborator

@DanielNoord DanielNoord left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd probably mention the fact that we now correctly support the exceptions attribute for ExceptionGroup instead, as that is the real astroid future. But I don't mind too much, so feel free to merge!

Mention what is newly supported in Astroid.

Co-authored-by: DaniΓ«l van Noord <[email protected]>
@mbyrnepr2
Copy link
Member Author

I'd probably mention the fact that we now correctly support the exceptions attribute for ExceptionGroup instead, as that is the real astroid future. But I don't mind too much, so feel free to merge!

I'll take your advice! Do you like the wording now?

@mbyrnepr2 mbyrnepr2 added this to the 4.0.0 milestone Sep 26, 2025
@DanielNoord DanielNoord merged commit df07b50 into pylint-dev:main Sep 26, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

False positive E1136 unsubscriptable-object on ExceptionGroup not-an-iterable false positive on ExceptionGroup.exceptions
3 participants