Skip to content

Commit

Permalink
Make version tuple major/minor/patch elements integers
Browse files Browse the repository at this point in the history
  • Loading branch information
jelmer committed Oct 20, 2024
1 parent 9290c00 commit d39fd8d
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 d39fd8d

Please sign in to comment.