From d1215ea56f36ebacc3bd720e2d27f7a4fb7916b2 Mon Sep 17 00:00:00 2001 From: Navin Chandra Date: Fri, 13 Sep 2024 23:35:51 +0530 Subject: [PATCH 1/2] tox formatting for python files in `format.sh` --- scripts/format.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/format.sh b/scripts/format.sh index b2c55be9d746a..2fc8167fddca5 100755 --- a/scripts/format.sh +++ b/scripts/format.sh @@ -31,5 +31,12 @@ section "Rust" echo " rustfmt" >&2 bazel run @rules_rust//:rustfmt +# TODO: use bazel target when rules_python supports formatting +section "Python" +echo " python - isort, black, flake8, docformatter" >&2 +pip install tox +TOXENV=linting +tox -c py/tox.ini + section "Copyright" bazel run //scripts:update_copyright From 7d084534055bb8a46243abdee5bf75ee6fb464b5 Mon Sep 17 00:00:00 2001 From: Navin Chandra Date: Tue, 8 Oct 2024 13:45:51 +0530 Subject: [PATCH 2/2] export TOXENV variable --- scripts/format.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/format.sh b/scripts/format.sh index 2fc8167fddca5..df0156aa14efe 100755 --- a/scripts/format.sh +++ b/scripts/format.sh @@ -35,7 +35,7 @@ bazel run @rules_rust//:rustfmt section "Python" echo " python - isort, black, flake8, docformatter" >&2 pip install tox -TOXENV=linting +export TOXENV=linting tox -c py/tox.ini section "Copyright"