Add mandatory "black" formatting to CI
About
Add a style checking step in CI.
To do
-
Update CI to add "style" stage -
Apply black on all modules
Note
Possible pre-commit hook (.git/hooks/pre-commit
with +x
file mode)
#!/bin/bash
PRECOMMITED_FILES="$(git diff --cached --name-only --diff-filter=ACM | tr '\n' ' ')"
LC_ALL=C.UTF-8 python -m black --check --fast --target-version py39 --line-length 120 --exclude nabu/thirdparty $PRECOMMITED_FILES
Edited by Pierre Paleo