Skip to content

Commit bcd0858

Browse files
committed
reword the func names
1 parent 1c20448 commit bcd0858

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

examples/bzlmod/MODULE.bazel.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

python/private/pypi/extension.bzl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ load("//python/private:semver.bzl", "semver")
2323
load("//python/private:version_label.bzl", "version_label")
2424
load(":attrs.bzl", "use_isolated")
2525
load(":evaluate_markers.bzl", "evaluate_markers", EVALUATE_MARKERS_SRCS = "SRCS")
26-
load(":hub_repository.bzl", "hub_repository", "whl_aliases")
26+
load(":hub_repository.bzl", "hub_repository", "whl_config_settings_to_json")
2727
load(":parse_requirements.bzl", "host_platform", "parse_requirements", "select_requirement")
2828
load(":parse_whl_name.bzl", "parse_whl_name")
2929
load(":pip_repository_attrs.bzl", "ATTRS")
@@ -641,8 +641,8 @@ def _pip_impl(module_ctx):
641641
repo_name = hub_name,
642642
extra_hub_aliases = mods.extra_aliases.get(hub_name, {}),
643643
whl_map = {
644-
key: whl_aliases(aliases)
645-
for key, aliases in whl_map.items()
644+
key: whl_config_settings_to_json(values)
645+
for key, values in whl_map.items()
646646
},
647647
packages = mods.exposed_packages.get(hub_name, []),
648648
groups = mods.hub_group_map.get(hub_name),

python/private/pypi/hub_repository.bzl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def _impl(rctx):
2929
bzl_packages = rctx.attr.packages or rctx.attr.whl_map.keys()
3030
aliases = render_multiplatform_pkg_aliases(
3131
aliases = {
32-
key: _whl_aliases(values)
32+
key: _whl_config_settings_from_json(values)
3333
for key, values in rctx.attr.whl_map.items()
3434
},
3535
extra_hub_aliases = rctx.attr.extra_hub_aliases,
@@ -95,22 +95,22 @@ in the pip.parse tag class.
9595
implementation = _impl,
9696
)
9797

98-
def _whl_aliases(repo_mapping_json):
99-
"""Inverse of whl_aliases
98+
def _whl_config_settings_from_json(repo_mapping_json):
99+
"""Deserialize the serialized values with whl_config_settings_to_json.
100100
101101
Args:
102102
repo_mapping_json: {type}`str`
103103
104104
Returns:
105-
What `whl_aliases` accepts.
105+
What `whl_config_settings_to_json` accepts.
106106
"""
107107
return {
108108
whl_config_setting(**v): repo
109109
for repo, values in json.decode(repo_mapping_json).items()
110110
for v in values
111111
}
112112

113-
def whl_aliases(repo_mapping):
113+
def whl_config_settings_to_json(repo_mapping):
114114
"""A function to serialize the aliases so that `hub_repository` can accept them.
115115
116116
Args:

0 commit comments

Comments
 (0)