build: add pre-commit configuration to run black (#49784)
This commit is contained in:
parent
10631cb30e
commit
3447c30738
|
@ -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', 'py35', '--skip-string-normalization', '--line-length', '110']
|
7
README
7
README
|
@ -32,7 +32,12 @@ in the CHRONO_SETTINGS_FILE environment variable.
|
|||
Code Style
|
||||
----------
|
||||
|
||||
black --target-version py35 --skip-string-normalization --line-length 110
|
||||
black is used to format the code, using thoses parameters:
|
||||
|
||||
black --target-version py35 --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
|
||||
|
|
Loading…
Reference in New Issue