commitizen icon indicating copy to clipboard operation
commitizen copied to clipboard

refactor(Init): fix unbounded variable in _ask_tag_format

Open bearomorphism opened this issue 7 months ago • 1 comments

Description

Before this change, the type of tag_format is Any | Unbounded | str at the end of the function. Actually tag_format is defined for all code paths.

  • If is_correct_format is True, then tag_format is assigned "v$version" and the function returns it.
  • If is_correct_format is False, then tag_format is initialized in the if-block.

The function logic should be easier to understand after this change.

Checklist

bearomorphism avatar Jun 10 '25 04:06 bearomorphism

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :warning: Please upload report for BASE (v4-9-0-test@6b4f8b0). Learn more about missing BASE report.

Additional details and impacted files
@@              Coverage Diff               @@
##             v4-9-0-test    #1529   +/-   ##
==============================================
  Coverage               ?   98.07%           
==============================================
  Files                  ?       58           
  Lines                  ?     2700           
  Branches               ?        0           
==============================================
  Hits                   ?     2648           
  Misses                 ?       52           
  Partials               ?        0           
Flag Coverage Δ
unittests 98.07% <100.00%> (?)

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov[bot] avatar Jun 10 '25 04:06 codecov[bot]