From d39fd8d864fa4c38f7151e6a3b0a1e9fd554315d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jelmer=20Vernoo=C4=B3?= Date: Sun, 20 Oct 2024 13:38:37 +0000 Subject: [PATCH] Make version tuple major/minor/patch elements integers --- testtools/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testtools/__init__.py b/testtools/__init__.py index 9af8522b..92cb3104 100644 --- a/testtools/__init__.py +++ b/testtools/__init__.py @@ -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: