Update black targets to also check and re-format Python scripts which
don't contain .py extension.
@@ -375,6 +375,7 @@ black: requirements .black-check
echo "Running black on" $$component; \
echo "==========================================================="; \
. $(VIRTUALENV_DIR)/bin/activate ; black --check --config pyproject.toml $$component/ || exit 1; \
+ . $(VIRTUALENV_DIR)/bin/activate ; black $$(grep -rl '^#!/.*python' $$component/bin) || exit 1; \
done
# runner modules and packages
@for component in $(COMPONENTS_RUNNERS); do\
@@ -382,6 +383,7 @@ black: requirements .black-check
echo "Running black on" $$component; \
echo "==========================================================="; \
. $(VIRTUALENV_DIR)/bin/activate ; black --check --config pyproject.toml $$component/ || exit 1; \
+ . $(VIRTUALENV_DIR)/bin/activate ; black $$(grep -rl '^#!/.*python' $$component/bin) || exit 1; \
done
. $(VIRTUALENV_DIR)/bin/activate; black --check --config pyproject.toml contrib/ || exit 1;
. $(VIRTUALENV_DIR)/bin/activate; black --check --config pyproject.toml scripts/*.py || exit 1;
@@ -403,6 +405,7 @@ black: requirements .black-format
echo "Running black on" $$component; \
echo "==========================================================="; \
. $(VIRTUALENV_DIR)/bin/activate ; black --config pyproject.toml $$component/ || exit 1; \
+ . $(VIRTUALENV_DIR)/bin/activate ; black $$(grep -rl '^#!/.*python' $$component/bin) || exit 1; \
done
# runner modules and packages
@for component in $(COMPONENTS_RUNNERS); do\
@@ -410,6 +413,7 @@ black: requirements .black-format
echo "Running black on" $$component; \
echo "==========================================================="; \
. $(VIRTUALENV_DIR)/bin/activate ; black --config pyproject.toml $$component/ || exit 1; \
+ . $(VIRTUALENV_DIR)/bin/activate ; black $$(grep -rl '^#!/.*python' $$component/bin) || exit 1; \
done
. $(VIRTUALENV_DIR)/bin/activate; black --config pyproject.toml contrib/ || exit 1;
. $(VIRTUALENV_DIR)/bin/activate; black --config pyproject.toml scripts/*.py || exit 1;
