mirror of
https://github.com/TECHNOFAB11/bumpver.git
synced 2025-12-12 06:20:08 +01:00
make fmt
This commit is contained in:
parent
7d56d7b582
commit
61a5556a4a
1 changed files with 3 additions and 3 deletions
|
|
@ -304,15 +304,15 @@ def _replace_pattern_parts(pattern: str) -> str:
|
|||
if start_idx < 0:
|
||||
break
|
||||
|
||||
field = PATTERN_PART_FIELDS[part_name]
|
||||
field = PATTERN_PART_FIELDS[part_name]
|
||||
if field in used_fields:
|
||||
named_part_pattern = f"(?P<{field}_{len(used_fields)}>{part_pattern})"
|
||||
else:
|
||||
named_part_pattern = f"(?P<{field}>{part_pattern})"
|
||||
used_fields.add(field)
|
||||
|
||||
end_idx = start_idx + len(part_name)
|
||||
sort_key = (-end_idx, -len(part_name))
|
||||
end_idx = start_idx + len(part_name)
|
||||
sort_key = (-end_idx, -len(part_name))
|
||||
part_patterns_by_index[sort_key] = (start_idx, end_idx, named_part_pattern)
|
||||
|
||||
# NOTE (mb 2020-09-17): The sorting is done so that we process items:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue