-
-
Notifications
You must be signed in to change notification settings - Fork 290
fix(ExitCode): add from_str in ExitCode and replace parse_no_raise with it, warn if the error code is not in range #1545
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v4-9-0-test
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## v4-9-0-test #1545 +/- ##
==============================================
Coverage ? 97.98%
==============================================
Files ? 58
Lines ? 2680
Branches ? 0
==============================================
Hits ? 2626
Misses ? 54
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
39b824e
to
5425115
Compare
commitizen/exceptions.py
Outdated
if value.isdecimal(): | ||
try: | ||
return cls(int(value)) | ||
except ValueError: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of returning None
, I think we should raise error and handles it in commitizen/cli.py
instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it might make the code longer, but makes more sense IMO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
k
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh I misunderstood. I'll fix it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed.
…th it Warn if a given decimal string is not in range
Description
Checklist
Code Changes
poetry all
locally to ensure this change passes linter check and tests