Skip to content

Add mandatory "black" formatting to CI

Pierre Paleo requested to merge ci_black into master

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

Merge request reports

Loading