Skip to content

fix(type_checking_constructor_mixin): narrow bare except to AttributeError - #171

Open
SoundMatt wants to merge 1 commit into
COVESA:masterfrom
SoundMatt:fix/type-checking-mixin-bare-except
Open

fix(type_checking_constructor_mixin): narrow bare except to AttributeError#171
SoundMatt wants to merge 1 commit into
COVESA:masterfrom
SoundMatt:fix/type-checking-mixin-bare-except

Conversation

@SoundMatt

Copy link
Copy Markdown
Contributor

The bare except: in type_checking_constructor catches every exception, including KeyboardInterrupt and SystemExit. The block exists solely to handle the case where self has no .name attribute, so narrow it to except AttributeError.

… AttributeError

The bare `except:` block is used to handle the case where `self` has no
`.name` attribute.  Narrow it to `except AttributeError` so that
`KeyboardInterrupt` and other fatal signals are not inadvertently swallowed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Signed-off-by: Matt Jones <47545907+SoundMatt@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants