Skip to content

fix(Init): fix a typo in _ask_version_provider options and remove unnecessary filter #1528

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

Merged

Conversation

bearomorphism
Copy link
Contributor

@bearomorphism bearomorphism commented Jun 10, 2025

Description

  • Fix a typo in uv option

Checklist

Copy link

codecov bot commented Jun 10, 2025

Codecov Report

❌ Patch coverage is 65.21739% with 8 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (v4-9-0-test@e70c0a6). Learn more about missing BASE report.

Files with missing lines Patch % Lines
commitizen/commands/init.py 65.21% 8 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff               @@
##             v4-9-0-test    #1528   +/-   ##
==============================================
  Coverage               ?   98.09%           
==============================================
  Files                  ?       58           
  Lines                  ?     2683           
  Branches               ?        0           
==============================================
  Hits                   ?     2632           
  Misses                 ?       51           
  Partials               ?        0           
Flag Coverage Δ
unittests 98.09% <65.21%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bearomorphism bearomorphism marked this pull request as ready for review June 10, 2025 04:27
@Lee-W Lee-W added this to the 4.9.0 milestone Jun 10, 2025
@bearomorphism bearomorphism changed the base branch from master to v4-9-0-test June 10, 2025 11:03
@bearomorphism bearomorphism changed the title fix(Init): fix a typo in _ask_version_provider options and remove unn… fix(Init): fix a typo in _ask_version_provider options and remove unnecessary filter Jun 10, 2025
"uv": "uv: Get and set version from pyproject.toml and uv.lock",
"scm": "scm: Fetch the version from git and does not need to set it back",
}
options = (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
options = (
# (tool_name, description)
options = (

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

named tuple might be better but comment works for me as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's do named tuple

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, I added a named tuple for it, please review.

@bearomorphism bearomorphism force-pushed the f-init-version-provider branch 2 times, most recently from 35677c1 to 1c02970 Compare August 13, 2025 07:51
@@ -17,6 +17,54 @@
from commitizen.version_schemes import KNOWN_SCHEMES, Version, get_version_scheme


class _VersionProviderOption(NamedTuple):
value: str
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
value: str
provider_name: str

value is vague

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

…ecessary filter, use named tuple for options
@bearomorphism bearomorphism force-pushed the f-init-version-provider branch from 1c02970 to d966d5f Compare August 13, 2025 09:41
@Lee-W Lee-W merged commit d417cf7 into commitizen-tools:v4-9-0-test Aug 13, 2025
18 checks passed
@bearomorphism bearomorphism deleted the f-init-version-provider branch August 13, 2025 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants