fix: replace bare except with except Exception in parse_dataclass#9088
fix: replace bare except with except Exception in parse_dataclass#9088harshadkhetpal wants to merge 2 commits intomarimo-team:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
|
This pull request has been automatically marked as stale because it has not had activity in 30 days. It will be closed in 14 days if no further activity occurs. If this PR is still relevant, please leave a comment or push new changes to keep it open. Thank you for your contribution! |
Summary
Replace bare
except:withexcept Exception:inmarimo/_utils/parse_dataclass.py.Bare
except:catches all exceptions includingSystemExit,KeyboardInterrupt, andGeneratorExit, which should generally not be caught. In this case the handler immediately re-raises, so narrowing toExceptionpreserves the intent while following Python best practices (PEP 8).Change:
Testing
No behavior change — the except clause still catches and re-raises all standard exceptions.