Skip to content

Commit ccf9961

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

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_collections` that may be absent, or have a collection name associated with a list of string targets:
111111
# target_collections = {
112112
# "host": [
@@ -144,7 +144,7 @@ def refresh_compile_commands(
144144

145145
target_collection_targets_list = []
146146
serialized_target_collections = {}
147-
147+
148148
if target_collections:
149149
# Convert the targets specified in `target_collections` into the format we'll use with `targets`, so we can combine them into one list of targets to generate compile commands for.
150150
for targets_for_collection in target_collections.values():
@@ -161,7 +161,7 @@ def refresh_compile_commands(
161161
flags = ""
162162

163163
target_data = (_make_label_absolute(target_name), flags)
164-
164+
165165
# Targets may appear in multiple collections. We don't want duplicates in the final list, but Starlark doesn't have Python's set class. So we de-duplicate manually.
166166
if target_data not in target_collection_targets_list:
167167
target_collection_targets_list.append(target_data)
@@ -176,9 +176,9 @@ def refresh_compile_commands(
176176
serialized_targets.append("".join(target))
177177
else:
178178
serialized_targets.append(target)
179-
179+
180180
serialized_target_collections[collection] = serialized_targets
181-
181+
182182
target_collection_targets = {"{}{}".format(target, flags): [target, flags] for target, flags in target_collection_targets_list}
183183

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

0 commit comments

Comments
 (0)