misc: add isort files/notes (#55470)
This commit is contained in:
parent
0f75316e1b
commit
1ebef30dbe
|
@ -1,2 +1,4 @@
|
||||||
# trivial: apply black
|
# trivial: apply black
|
||||||
2bf37aaa7e459d429fca284f2de60add5841d063
|
2bf37aaa7e459d429fca284f2de60add5841d063
|
||||||
|
# trivial: apply isort (#55470)
|
||||||
|
0f75316e1b9a70e311d2971e75b32f84b00f487a
|
||||||
|
|
|
@ -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']
|
||||||
|
|
9
README
9
README
|
@ -15,12 +15,17 @@ Variables
|
||||||
Code Style
|
Code Style
|
||||||
----------
|
----------
|
||||||
|
|
||||||
black is used to format the Python code, using thoses parameters:
|
black is used to format the Python code, using these parameters:
|
||||||
|
|
||||||
black --target-version py37 --skip-string-normalization --line-length 110
|
black --target-version py37 --skip-string-normalization --line-length 110
|
||||||
|
|
||||||
|
Similarly, isort is used for imports, using these parameters:
|
||||||
|
|
||||||
|
isort --profile black --line-length 110
|
||||||
|
|
||||||
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.)
|
and isort before commits. (execute `pre-commit install` to install the git
|
||||||
|
hook.)
|
||||||
|
|
||||||
|
|
||||||
License
|
License
|
||||||
|
|
Loading…
Reference in New Issue