diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 00000000..37feebe1 --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,2 @@ +# trivial: apply black +3d9df1e5261fdce5389f7da3612c78ccb8417ef0 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..a14705c7 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,8 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: +- repo: https://github.com/psf/black + rev: 20.8b1 + hooks: + - id: black + args: ['--target-version', 'py37', '--skip-string-normalization', '--line-length', '110'] diff --git a/README b/README index a84fa7e5..8efb5dd1 100644 --- a/README +++ b/README @@ -55,6 +55,17 @@ local_settings.py file set in the same directory, or by a file referenced in the PASSERELLE_SETTINGS_FILE environment variable. +Code Style +---------- + +black is used to format the code, using thoses parameters: + + black --target-version py37 --skip-string-normalization --line-length 110 + +There is .pre-commit-config.yaml to use pre-commit to automatically run black +before commits. (execute `pre-commit install` to install the git hook.) + + Tests -----