0001-misc-add-isort-52797.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 | ||
---|---|---|
96 | 96 | |
97 | 97 |
black --target-version py37 --skip-string-normalization --line-length 110 |
98 | 98 | |
99 |
There is .pre-commit-config.yaml to use pre-commit to automatically run black |
|
99 |
isort is used to format the imports, using those parameters: |
|
100 | ||
101 |
isort --profile black --line-length 110 |
|
102 | ||
103 |
There is .pre-commit-config.yaml to use pre-commit to automatically run black and isort |
|
100 | 104 |
before commits. (execute `pre-commit install` to install the git hook.) |
101 | 105 | |
102 | 106 |
tox.ini | ||
---|---|---|
1 | 1 |
[tox] |
2 | 2 |
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/combo/{env:BRANCH_NAME:} |
3 |
envlist = coverage-py3-django111-black-pylint-{sqlite,pg},py3-django22-pg
|
|
3 |
envlist = coverage-py3-django111-codestyle-pylint-{sqlite,pg},py3-django22-pg
|
|
4 | 4 | |
5 | 5 |
[testenv] |
6 | 6 |
usedevelop = True |
... | ... | |
32 | 32 |
vobject |
33 | 33 |
django-ratelimit<3 |
34 | 34 |
git+https://git.entrouvert.org/debian/django-ckeditor.git |
35 |
black: pre-commit
|
|
35 |
pre-commit |
|
36 | 36 |
uwsgidecorators |
37 | 37 |
commands = |
38 | 38 |
./getlasso3.sh |
39 | 39 |
python manage.py compilemessages |
40 | 40 |
py.test {env:COVERAGE:} {posargs: --junitxml=junit-{envname}.xml tests/} |
41 | 41 |
pylint: ./pylint.sh combo/ |
42 |
black: pre-commit run black --all-files --show-diff-on-failure |
|
42 |
codestyle: pre-commit run --all-files --show-diff-on-failure |
|
43 |
- |