Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0245469

Browse files
style(CustomBumpRule): rename var
1 parent 2c9af08 commit 0245469

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

‎commitizen/bump_rule.py‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,13 +180,17 @@ def get_increment(
180180
if not (m := self.bump_pattern.search(commit_message)):
181181
return None
182182

183-
bump_map = (
183+
effective_bump_map = (
184184
self.bump_map_major_version_zero if major_version_zero else self.bump_map
185185
)
186186

187187
try:
188188
if ret := SemVerIncrement.get_highest(
189-
(increment for name, increment in bump_map.items() if m.group(name)),
189+
(
190+
increment
191+
for name, increment in effective_bump_map.items()
192+
if m.group(name)
193+
),
190194
):
191195
return ret
192196
except IndexError:
@@ -195,7 +199,7 @@ def get_increment(
195199

196200
# Fallback to old school bump rule
197201
found_keyword = m.group(1)
198-
for match_pattern, increment in bump_map.items():
202+
for match_pattern, increment in effective_bump_map.items():
199203
if re.match(match_pattern, found_keyword):
200204
return increment
201205
return None

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /