-
-
Notifications
You must be signed in to change notification settings - Fork 286
refactor: do not guess if changelog format is provided, make function private #1471
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?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## refactors #1471 +/- ##
==========================================
Coverage 97.82% 97.82%
==========================================
Files 57 57
Lines 2619 2620 +1
==========================================
+ Hits 2562 2563 +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:
|
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.
mostly good, left some nitpicks
|
||
if not format: | ||
raise ChangelogFormatUnknown(f"Unknown changelog format '{name}'") | ||
|
||
return format(config) | ||
|
||
|
||
def guess_changelog_format(filename: str | None) -> type[ChangelogFormat] | None: | ||
def _guess_changelog_format(filename: str | None) -> type[ChangelogFormat] | 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 probably could add a deprecation warning to guess_changelog_format
and remove it in v5
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, please review
@@ -6,14 +6,12 @@ | |||
|
|||
def committer_factory(config: BaseConfig) -> BaseCommitizen: | |||
"""Return the correct commitizen existing in the registry.""" | |||
name: str = config.settings["name"] |
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.
probably no harm to keep 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
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