We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f4e0334 commit ee43bdbCopy full SHA for ee43bdb
bumpversion/version_part.py
@@ -60,7 +60,12 @@ def is_independent(self) -> bool:
60
return self.config.independent
61
62
def __format__(self, format_spec: str) -> str:
63
- return self.value
+ try:
64
+ val = int(self.value)
65
+ except ValueError:
66
+ return self.value
67
+ else:
68
+ return int.__format__(val, format_spec)
69
70
def __repr__(self) -> str:
71
return f"<bumpversion.VersionPart:{self.func.__class__.__name__}:{self.value}>"
0 commit comments