add isort configuration (#52457)
This commit is contained in:
parent
86d946adcd
commit
41e2c8eee3
|
@ -1,2 +1,4 @@
|
||||||
# misc: apply black
|
# misc: apply black
|
||||||
4bb33d3d3c62516cfdb1ff5bba9216936a07d368
|
4bb33d3d3c62516cfdb1ff5bba9216936a07d368
|
||||||
|
# misc: apply isort
|
||||||
|
86d946adcdc784693d733131c2aecafc6caa8cbb
|
||||||
|
|
|
@ -6,3 +6,8 @@ repos:
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: black
|
||||||
args: ['--target-version', 'py37', '--skip-string-normalization', '--line-length', '110']
|
args: ['--target-version', 'py37', '--skip-string-normalization', '--line-length', '110']
|
||||||
|
- repo: https://github.com/PyCQA/isort
|
||||||
|
rev: 5.7.0
|
||||||
|
hooks:
|
||||||
|
- id: isort
|
||||||
|
args: ['--profile', 'black', '--line-length', '110']
|
||||||
|
|
4
README
4
README
|
@ -78,6 +78,10 @@ black is used to format the code, using thoses parameters:
|
||||||
There is .pre-commit-config.yaml to use pre-commit to automatically run black
|
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.)
|
before commits. (execute `pre-commit install` to install the git hook.)
|
||||||
|
|
||||||
|
isort is used to format the imports, using those parameter:
|
||||||
|
|
||||||
|
isort --force-single-line-imports --line-length 110
|
||||||
|
|
||||||
Support
|
Support
|
||||||
=======
|
=======
|
||||||
|
|
||||||
|
|
1
tox.ini
1
tox.ini
|
@ -113,6 +113,7 @@ deps =
|
||||||
pre-commit
|
pre-commit
|
||||||
commands =
|
commands =
|
||||||
pre-commit run black --all-files --show-diff-on-failure
|
pre-commit run black --all-files --show-diff-on-failure
|
||||||
|
pre-commit run isort --all-files --show-diff-on-failure
|
||||||
|
|
||||||
[pytest]
|
[pytest]
|
||||||
filterwarnings =
|
filterwarnings =
|
||||||
|
|
Loading…
Reference in New Issue