fix: replace bare except with except Exception#1225
fix: replace bare except with except Exception#1225YouFoxGirl wants to merge 1 commit intoe2b-dev:mainfrom
Conversation
|
There was a problem hiding this comment.
💡 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: |
There was a problem hiding this comment.
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.
2bdb2b4 to
fc81fa9
Compare
What this PR does
Replace bare
except:clauses withexcept Exception:to avoid catchingKeyboardInterruptandSystemExit. Added a TODO note for futuremore specific exception handling where applicable.
Why this matters
Bare
except:catches all exceptions includingKeyboardInterruptand
SystemExit, which can hide bugs and make debugging harder.