Skip to content

Commit 12aebcf

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 3d19ef4 commit 12aebcf

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

refresh.template.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1433,7 +1433,7 @@ def main():
14331433
There should be actionable warnings, above, that led to this.""")
14341434
sys.exit(1)
14351435

1436-
1436+
14371437
if not (root_dir := pathlib.Path({out_dir})).exists():
14381438
root_dir.mkdir(parents=True)
14391439

refresh_compile_commands.bzl

+6-6
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def refresh_compile_commands(
9191
exclude_headers = None,
9292
exclude_external_sources = False,
9393
**kwargs): # For the other common attributes. Tags, compatible_with, etc. https://docs.bazel.build/versions/main/be/common-definitions.html#common-attributes.
94-
94+
9595
# Given `targets` that may be absent, or be a single string target:
9696
# targets = "//:some_target"
9797
#
@@ -106,7 +106,7 @@ def refresh_compile_commands(
106106
# "//:some_target": "--flag ...",
107107
# "//:another_target": "--arg ..."
108108
# }
109-
#
109+
#
110110
# And given `target_groups` that may be absent, or have a group name associated with a string target or list of string targets:
111111
# target_groups = {
112112
# "host": "//:host_target",
@@ -141,7 +141,7 @@ def refresh_compile_commands(
141141

142142
target_group_targets_list = []
143143
serialized_target_groups = {}
144-
144+
145145
if target_groups:
146146
# Convert the targets specified in `target_groups` into the format we'll use with `targets`, so we can combine them into one list of targets to generate compile commands for.
147147
for targets_for_group in target_groups.values():
@@ -158,7 +158,7 @@ def refresh_compile_commands(
158158
flags = ""
159159

160160
target_data = (_make_label_absolute(target_name), flags)
161-
161+
162162
# Targets may appear in multiple groups. We don't want duplicates in the final list, but Starlark doesn't have Python's set class. So we de-duplicate manually.
163163
if target_data not in target_group_targets_list:
164164
target_group_targets_list.append(target_data)
@@ -173,9 +173,9 @@ def refresh_compile_commands(
173173
serialized_targets.append("".join(target))
174174
else:
175175
serialized_targets.append(target)
176-
176+
177177
serialized_target_groups[group] = serialized_targets
178-
178+
179179
target_group_targets = {"{}{}".format(target, flags): [target, flags] for target, flags in target_group_targets_list}
180180

181181
# Convert the various, acceptable target shorthands into the dictionary format

0 commit comments

Comments
 (0)