0002-misc-add-isort-52856.patch
.pre-commit-config.yaml | ||
---|---|---|
6 | 6 |
hooks: |
7 | 7 |
- id: black |
8 | 8 |
args: ['--target-version', 'py37', '--skip-string-normalization', '--line-length', '110'] |
9 |
- repo: https://github.com/PyCQA/isort |
|
10 |
rev: 5.7.0 |
|
11 |
hooks: |
|
12 |
- id: isort |
|
13 |
args: ['--profile', 'black', '--line-length', '110'] |
README | ||
---|---|---|
36 | 36 | |
37 | 37 |
black --target-version py35 --skip-string-normalization --line-length 110 |
38 | 38 | |
39 |
There is .pre-commit-config.yaml to use pre-commit to automatically run black |
|
39 |
isort is used to format the imports, using those parameters: |
|
40 | ||
41 |
isort --profile black --line-length 110 |
|
42 | ||
43 |
There is .pre-commit-config.yaml to use pre-commit to automatically run black and isort |
|
40 | 44 |
before commits. (execute `pre-commit install` to install the git hook.) |
41 | 45 | |
42 | 46 |
tox.ini | ||
---|---|---|
38 | 38 |
python3 setup.py compile_translations |
39 | 39 |
py.test {env:COVERAGE:} {posargs:tests/} |
40 | 40 |
pylint: ./pylint.sh chrono/ |
41 |
black: pre-commit run black --all-files --show-diff-on-failure |
|
41 |
codestyle: pre-commit run --all-files --show-diff-on-failure |
|
42 |
- |