-
-
Notifications
You must be signed in to change notification settings - Fork 281
refactor(bump): code cleanup and better test coverage #1422
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: refactors
Are you sure you want to change the base?
refactor(bump): code cleanup and better test coverage #1422
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## refactors #1422 +/- ##
============================================
Coverage ? 97.68%
============================================
Files ? 57
Lines ? 2680
Branches ? 0
============================================
Hits ? 2618
Misses ? 62
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:
|
@@ -148,7 +144,7 @@ def __call__(self) -> None: # noqa: C901 | |||
except TypeError: | |||
raise NoVersionSpecifiedError() | |||
|
|||
bump_commit_message: str = self.bump_settings["bump_message"] | |||
bump_commit_message: str | None = self.bump_settings["bump_message"] |
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.
This type should be str | None
because the default value is None
. Not sure if we can improve the type safety here.
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 think we'll need to redesign the config as a whole #1445
but let's keep it for now
Let me reorganize the commits. |
c952dc9
to
e5226f3
Compare
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.
Left a few nits but ready to merge
@@ -148,7 +144,7 @@ def __call__(self) -> None: # noqa: C901 | |||
except TypeError: | |||
raise NoVersionSpecifiedError() | |||
|
|||
bump_commit_message: str = self.bump_settings["bump_message"] | |||
bump_commit_message: str | None = self.bump_settings["bump_message"] |
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 think we'll need to redesign the config as a whole #1445
but let's keep it for now
from commitizen import defaults | ||
from commitizen.commands.bump import Bump | ||
from commitizen.config import BaseConfig | ||
|
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.
nit: is there any specific reason we need to import it here?
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 guess no. I'll fix it when I have time later this weekend
Description
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