Skip to content

Commit

Permalink
Merge pull request #404 from testing-cabal/version-tuple-ints
Browse files Browse the repository at this point in the history
Make version tuple major/minor/patch elements integers
  • Loading branch information
jelmer authored Oct 20, 2024
2 parents 9290c00 + d39fd8d commit 62cbf92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion testtools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
# This will fail with LookupError if the package is not installed in
# editable mode or if Git is not installed.
version = get_version(root="..", relative_to=__file__)
__version__ = tuple(version.split("."))
__version__ = tuple([int(v) if v.isdigit() else v for v in version.split(".")])
except (ImportError, LookupError):
# As a fallback, use the version that is hard-coded in the file.
try:
Expand Down

0 comments on commit 62cbf92

Please sign in to comment.