-
-
Notifications
You must be signed in to change notification settings - Fork 286
Add type hints for cli.py #1479
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
Conversation
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.
👍👍👍
commitizen/cli.py
Outdated
config: str | None = None | ||
debug: bool = False | ||
name: str | None = None | ||
no_raise: str | None = None |
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.
We could probably add a comment mentioning that it will later be parsed as list[int]
. A bit confusing at the first glance
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
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## refactors #1479 +/- ##
==========================================
Coverage 97.82% 97.82%
==========================================
Files 57 57
Lines 2618 2619 +1
==========================================
+ Hits 2561 2562 +1
Misses 57 57
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:
|
Since the project requires Python >=3.9, argparse only raises SystemExit when non-existent commands are provided, making TypeError handling unnecessary.
Description
Resolves #1477
I hope this can be merged into the
refactors
branch instead ofmaster
.Checklist
Code Changes
poetry all
locally to ensure this change passes linter check and testsDocumentation Changes
poetry doc
locally to ensure the documentation pages renders correctlyExpected Behavior
Steps to Test This Pull Request
Additional Context