This commit is contained in:
parent
8bf4ab81c5
commit
3afaa1148a
|
@ -2,3 +2,5 @@
|
|||
caa40e7e771b41bd1d164341a2e7f40689cbe4ba
|
||||
# trivial: apply black (#58937)
|
||||
3ee72e5336d03526c7ab297a5cf09057a6d5d1c2
|
||||
# trivial: apply isort (#58937)
|
||||
8bf4ab81c5483af946365645d15708796c832d7e
|
||||
|
|
|
@ -6,6 +6,11 @@ repos:
|
|||
hooks:
|
||||
- id: black
|
||||
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']
|
||||
- repo: https://github.com/asottile/pyupgrade
|
||||
rev: v2.20.0
|
||||
hooks:
|
||||
|
|
12
README.txt
12
README.txt
|
@ -187,13 +187,17 @@ 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.)
|
||||
isort is used to format the imports, using those parameters:
|
||||
|
||||
isort --profile black --line-length 110
|
||||
|
||||
pyupgrade is used to automatically upgrade syntax, using those parameters:
|
||||
|
||||
pyupgrade --keep-percent-format --py37-plus
|
||||
|
||||
There is .pre-commit-config.yaml to use pre-commit to automatically pyupgrade
|
||||
before commits. (execute `pre-commit install` to install the git hook.)
|
||||
There is .pre-commit-config.yaml to use pre-commit to automatically run black,
|
||||
isort and pyupgrade before commits. (execute `pre-commit install` to install
|
||||
the git hook.)
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue