Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c0a6152

Browse filesBrowse files
committed
minor refactoring in processing the tag classes
1 parent 3cb0ff1 commit c0a6152
Copy full SHA for c0a6152

File tree

Expand file treeCollapse file tree

1 file changed

+5
-5
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-5
lines changed

‎python/private/python.bzl

Copy file name to clipboardExpand all lines: python/private/python.bzl
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -257,15 +257,15 @@ def _fail_multiple_default_toolchains(first, second):
257257
second = second,
258258
))
259259

260-
def _process_tag_classes(mod):
261-
arg_structs = []
260+
def _process_tag_classes(mod, fail = fail):
261+
registrations = []
262262
seen_versions = {}
263263
available_versions = {}
264264
available_versions.update(TOOL_VERSIONS)
265265
base_url = DEFAULT_RELEASE_BASE_URL
266266

267267
for tag in mod.tags.toolchain:
268-
arg_structs.append(_create_toolchain_attrs_struct(tag = tag, toolchain_tag_count = len(mod.tags.toolchain)))
268+
registrations.append(_create_toolchain_attrs_struct(tag = tag, toolchain_tag_count = len(mod.tags.toolchain)))
269269
seen_versions[tag.python_version] = True
270270

271271
if mod.is_root:
@@ -307,7 +307,7 @@ def _process_tag_classes(mod):
307307
break
308308

309309
if register_all:
310-
arg_structs.extend([
310+
registrations.extend([
311311
_create_toolchain_attrs_struct(python_version = v)
312312
for v in available_versions.keys()
313313
if v not in seen_versions
@@ -316,7 +316,7 @@ def _process_tag_classes(mod):
316316
return struct(
317317
available_versions = available_versions,
318318
base_url = base_url,
319-
registrations = arg_structs,
319+
registrations = registrations,
320320
)
321321

322322
def _create_toolchain_attrs_struct(*, tag = None, python_version = None, toolchain_tag_count = None):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.