Skip to content

Duplicate code in Version.bump_build #463

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
viccie30 opened this issue Jan 27, 2025 · 3 comments
Closed

Duplicate code in Version.bump_build #463

viccie30 opened this issue Jan 27, 2025 · 3 comments
Assignees

Comments

@viccie30
Copy link
Contributor

Which version of Python is the problem with?

3.13, 3.12, 3.11, 3.10, 3.9, 3.8, 3.7, 3.14

What semver version are you using?

3.0.4

What OS are you using? (Add more in the Environment section)

Linux, Windows

Situation

These lines duplicate the lines above and below.

# self._build or (token or "build") + ".0"
build = cls._increment_string(build)
if self._build is not None:
build = self._build
elif token == "":
build = "0"
elif token is None:
build = "build.0"
else:
build = str(token) + ".0"

How to reproduce

N/A

Expected behavior

N/A

Environment

No response

@tomschr
Copy link
Member

tomschr commented Jan 28, 2025

Thanks @viccie30! I've created PR #464. Would you mind having a quick look? Thanks!

@viccie30
Copy link
Contributor Author

viccie30 commented Jan 28, 2025

That looks good.

@tomschr
Copy link
Member

tomschr commented Jan 28, 2025

Thanks! I'll merge it then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants