File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -27,8 +27,12 @@ echo "$CHANGED_FILES"
2727
2828# Formatters are already installed in the activated venv from the GHA step.
2929# Use xargs to pass the file list to the formatters.
30- echo " $CHANGED_FILES " | xargs -r no_implicit_optional --use-union-or
31- echo " $CHANGED_FILES " | xargs -r pyupgrade --exit-zero-even-if-changed --py310-plus
32- echo " $CHANGED_FILES " | xargs -r autoflake -i -r --remove-all-unused-imports
33- echo " $CHANGED_FILES " | xargs -r ruff check --fix-only
34- echo " $CHANGED_FILES " | xargs -r ruff format
30+ run_formatter () {
31+ echo " $CHANGED_FILES " | xargs -r " $@ "
32+ }
33+
34+ run_formatter no_implicit_optional --use-union-or
35+ run_formatter pyupgrade --exit-zero-even-if-changed --py310-plus
36+ run_formatter autoflake -i -r --remove-all-unused-imports
37+ run_formatter ruff check --fix-only
38+ run_formatter ruff format
You can’t perform that action at this time.
0 commit comments