Skip to content

Commit 330b9f2

Browse files
committed
fixup
1 parent 0b57e4d commit 330b9f2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

python/private/python_repository.bzl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,11 @@ def _python_repository_impl(rctx):
6464
python_version = rctx.attr.python_version
6565
python_version_info = python_version.split(".")
6666
release_filename = rctx.attr.release_filename
67-
is_freethreaded = "freethreaded" in release_filename
68-
python_short_version = "{0}.{1}".format(*python_version_info) + "t" if is_freethreaded else ""
67+
version_suffix = "t" if "freethreaded" in release_filename else ""
68+
python_short_version = "{0}.{1}{suffix}".format(
69+
suffix = version_suffix,
70+
*python_version_info,
71+
)
6972
urls = rctx.attr.urls or [rctx.attr.url]
7073
auth = get_auth(rctx, urls)
7174

0 commit comments

Comments
 (0)