Skip to content

Commit 36da325

Browse files
Include other formatters in rule runner
1 parent 0308607 commit 36da325

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/python/pants/core/goals/update_build_files_test.py

+8
Original file line numberDiff line numberDiff line change
@@ -216,12 +216,20 @@ def black_rule_runner() -> RuleRunner:
216216
return RuleRunner(
217217
rules=(
218218
format_build_file_with_black,
219+
format_build_file_with_ruff,
220+
format_build_file_with_yapf,
219221
update_build_files,
220222
*config_files.rules(),
221223
*pex.rules(),
222224
*Black.rules(),
225+
# Even though Ruff and Yapf are included here,
226+
# only Black should be used for formatting.
227+
*Ruff.rules(),
228+
*Yapf.rules(),
223229
*UpdateBuildFilesSubsystem.rules(),
224230
UnionRule(RewrittenBuildFileRequest, FormatWithBlackRequest),
231+
UnionRule(RewrittenBuildFileRequest, FormatWithRuffRequest),
232+
UnionRule(RewrittenBuildFileRequest, FormatWithYapfRequest),
225233
),
226234
target_types=[GenericTarget],
227235
)

0 commit comments

Comments
 (0)