Skip to content

Commit ebfdbcb

Browse files
committed
remove assert in bump_version.py
1 parent 94c12d4 commit ebfdbcb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/bump_version.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ class Updater:
1313

1414
@staticmethod
1515
def replace(match: re.Match[str]) -> str:
16-
ver = [int(x) for x in match.groups()[:3]]
17-
assert len(ver) == len(COMPONENTS)
16+
ver = [int(x) for x in match.groups()[: len(COMPONENTS)]]
17+
for _ in range(len(ver) - 1, len(COMPONENTS)):
18+
ver.append(0)
1819
print("old version:", ".".join([str(x) for x in ver]))
1920
index = COMPONENTS.index(Updater.component)
2021
ver[index] += 1

0 commit comments

Comments
 (0)