Skip to content

Commit 3327e60

Browse files
committed
misc: fmt
1 parent a49e833 commit 3327e60

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

toolchain/internal/configure.bzl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ load(
1919
)
2020
load(
2121
"//toolchain/internal:common.bzl",
22+
_BZLMOD_ENABLED = "BZLMOD_ENABLED",
2223
_arch = "arch",
2324
_canonical_dir_path = "canonical_dir_path",
2425
_check_os_arch_keys = "check_os_arch_keys",
@@ -31,7 +32,6 @@ load(
3132
_pkg_path_from_label = "pkg_path_from_label",
3233
_supported_targets = "SUPPORTED_TARGETS",
3334
_toolchain_tools = "toolchain_tools",
34-
_BZLMOD_ENABLED = "BZLMOD_ENABLED",
3535
)
3636
load(
3737
"//toolchain/internal:sysroot.bzl",
@@ -42,7 +42,9 @@ load(
4242
def _make_string_label(repository, package, target):
4343
return "{prefix}{repo}//{package}:{target}".format(
4444
prefix = "@@" if _BZLMOD_ENABLED else "@",
45-
repo = repository, package = package, target = target,
45+
repo = repository,
46+
package = package,
47+
target = target,
4648
)
4749

4850
def llvm_config_impl(rctx):
@@ -83,7 +85,7 @@ def llvm_register_toolchains():
8385
# Otherwise, interpret as a key into `toolchain_roots_label_map`:
8486

8587
# Flip the map (note: no error on duplicate "keys" for now)
86-
label_map = { key: label for label, key in rctx.attr.toolchain_roots_label_map.items() }
88+
label_map = {key: label for label, key in rctx.attr.toolchain_roots_label_map.items()}
8789

8890
if not toolchain_root_val in label_map:
8991
fail(("Value in `toolchain_roots` {key} was interpreted as a `toolchain_roots_label_map` " +
@@ -154,7 +156,7 @@ def llvm_register_toolchains():
154156
symlinked_tools_str = ""
155157

156158
# Flip the sysroot label map (note: no error on duplicate "keys" for now)
157-
_sysroot_label_map = { key: label for label, key in rctx.attr.sysroot_label_map.items() }
159+
_sysroot_label_map = {key: label for label, key in rctx.attr.sysroot_label_map.items()}
158160
sysroot_paths_dict, sysroot_labels_dict = _sysroot_paths_dict(
159161
rctx,
160162
rctx.attr.sysroot,

toolchain/internal/repo.bzl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -279,11 +279,11 @@ llvm_config_attrs.update({
279279
# This map is inverted (Label -> key instead of key -> Label) because
280280
# there isn't a `string_keyed_label_dict`.
281281
doc = ("Inverted map from toolchain root Label to string identifier.\n" +
282-
"This attribute is to be used with `toolchain_roots` in order to specify roots " +
283-
"that come from a Bazel package. Keys can be any identifier that do not start " +
284-
"with a forward slash '/`.\n" +
285-
"Note that the target name in the Label to the root provided here is ignored: " +
286-
"only the Label's repository and package are used."),
282+
"This attribute is to be used with `toolchain_roots` in order to specify roots " +
283+
"that come from a Bazel package. Keys can be any identifier that do not start " +
284+
"with a forward slash '/`.\n" +
285+
"Note that the target name in the Label to the root provided here is ignored: " +
286+
"only the Label's repository and package are used."),
287287
),
288288
"absolute_paths": attr.bool(
289289
default = False,

toolchain/internal/sysroot.bzl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ def _sysroot_path(sysroot_dict, label_map, os, arch):
5353
# Otherwise, consult the label map:
5454
if sysroot not in label_map:
5555
fail(("Value in `sysroot` {key} was interpreted as a `sysroot_label_map` " +
56-
"key but it is not present in the map: {map}").format(
57-
key = sysroot, map = label_map,
56+
"key but it is not present in the map: {map}").format(
57+
key = sysroot,
58+
map = label_map,
5859
))
5960
label = label_map[sysroot]
6061

0 commit comments

Comments
 (0)