Skip to content

Commit d959aa7

Browse files
authored
Fix #463: Remove duplicate code Version.bump_build (#464)
* Fix #463: Remove duplicate code Version.bump_build * Update changelog
1 parent 6adf876 commit d959aa7

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

changelog.d/463.trivial.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove double code in :meth:`Version.bump_build`

src/semver/version.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -359,18 +359,6 @@ def bump_build(self, token: Optional[str] = "build") -> "Version":
359359
else:
360360
build = str(token) + ".0"
361361

362-
# self._build or (token or "build") + ".0"
363-
build = cls._increment_string(build)
364-
if self._build is not None:
365-
build = self._build
366-
elif token == "":
367-
build = "0"
368-
elif token is None:
369-
build = "build.0"
370-
else:
371-
build = str(token) + ".0"
372-
373-
# self._build or (token or "build") + ".0"
374362
build = cls._increment_string(build)
375363
return cls(self._major, self._minor, self._patch, self._prerelease, build)
376364

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy