Skip to content

fix: replace bare except with except Exception#1225

Open
YouFoxGirl wants to merge 1 commit intoe2b-dev:mainfrom
YouFoxGirl:foxclaw/fix-2026-03-21T23-18-37
Open

fix: replace bare except with except Exception#1225
YouFoxGirl wants to merge 1 commit intoe2b-dev:mainfrom
YouFoxGirl:foxclaw/fix-2026-03-21T23-18-37

Conversation

@YouFoxGirl
Copy link

@YouFoxGirl YouFoxGirl commented Mar 22, 2026

What this PR does

Replace bare except: clauses with except Exception: to avoid catching
KeyboardInterrupt and SystemExit. Added a TODO note for future
more specific exception handling where applicable.

Why this matters

Bare except: catches all exceptions including KeyboardInterrupt
and SystemExit, which can hide bugs and make debugging harder.

@changeset-bot
Copy link

changeset-bot bot commented Mar 22, 2026

⚠️ No Changeset found

Latest commit: fc81fa9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2bdb2b49f1

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".


return componentsschemas_mcp_type_0
except: # noqa: E722
except:

Choose a reason for hiding this comment

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

P1 Badge Replace bare except to keep python-sdk lint passing

This commit removes # noqa: E722 but leaves except: unchanged, which causes ruff check . (run by packages/python-sdk/Makefile lint target) to fail with E722 in this and the other edited model files; running lint in CI or locally will now break. Please switch these handlers to except Exception (or add an explicit suppression) so the pipeline remains green.

Useful? React with 👍 / 👎.

…files

Avoid catching KeyboardInterrupt and SystemExit by using except Exception:
instead of bare except: in generated API model classes.
@YouFoxGirl YouFoxGirl force-pushed the foxclaw/fix-2026-03-21T23-18-37 branch from 2bdb2b4 to fc81fa9 Compare March 22, 2026 02:31
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.

1 participant