diff --git a/tools/fmt.sh b/tools/fmt.sh index 3b5eed1..35e6415 100755 --- a/tools/fmt.sh +++ b/tools/fmt.sh @@ -2,12 +2,11 @@ set -euox pipefail cd "$(git rev-parse --show-toplevel)" -bazel build //tools/python/... +bazel build //tools/python/... //projects/reqsort DIRS=(projects tools) bazel-bin/tools/python/autoflake -ir "${DIRS[@]}" -bazel-bin/tools/python/black "${DIRS[@]}" bazel-bin/tools/python/isort "${DIRS[@]}" bazel-bin/tools/python/unify --quote '"' -ir "${DIRS[@]}" -bazel-bin/tools/python/reqsort --execute tools/python/requirements.txt +bazel-bin/projects/reqsort/reqsort --execute tools/python/requirements.txt diff --git a/tools/python/BUILD b/tools/python/BUILD index 1560f1c..8acec92 100644 --- a/tools/python/BUILD +++ b/tools/python/BUILD @@ -39,14 +39,6 @@ py_binary( ] ) -py_binary( - name = "black", - main = "black_shim.py", - deps = [ - py_requirement("black"), - ] -) - py_binary( name = "isort", main = "isort_shim.py", @@ -106,15 +98,6 @@ py_binary( ] ) -py_binary( - name = "reqsort", - main = "reqsort.py", - deps = [ - py_requirement("click"), - ] -) - - py_binary( name = "templater", main = "templater.py", diff --git a/tools/python/black_shim.py b/tools/python/black_shim.py deleted file mode 100644 index 70d9ace..0000000 --- a/tools/python/black_shim.py +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env python3 - -""" -Shim for executing black. -""" - -import re -import sys - -from black import patched_main - -if __name__ == "__main__": - sys.argv[0] = re.sub(r"(-script\.pyw|\.exe)?$", "", sys.argv[0]) - sys.exit(patched_main())