misc: add pyupgrade files/notes (#55490)
This commit is contained in:
parent
ff0d3779c0
commit
648140c7bb
|
@ -6,3 +6,5 @@ a11be8fa590ad3d02a903dacb8393336b989a1a6
|
|||
08f1431a665aec6586960e78cbfda6da47aa6862
|
||||
# misc: apply isort (#52224)
|
||||
48470c50c0e9b56e989cfbcdcec433de0cc8479a
|
||||
# misc: apply pyupgrade (#55490)
|
||||
ff0d3779c024ba3a0109b91d9337aadd06b06788
|
||||
|
|
|
@ -11,3 +11,8 @@ repos:
|
|||
hooks:
|
||||
- id: isort
|
||||
args: ['--profile', 'black', '--line-length', '110']
|
||||
- repo: https://github.com/asottile/pyupgrade
|
||||
rev: v2.20.0
|
||||
hooks:
|
||||
- id: pyupgrade
|
||||
args: ['--keep-percent-format', '--py37-plus']
|
||||
|
|
9
README
9
README
|
@ -43,8 +43,13 @@ isort is used to format the imports, using those parameters:
|
|||
|
||||
isort --profile black --line-length 110
|
||||
|
||||
There is .pre-commit-config.yaml to use pre-commit to automatically run black and isort
|
||||
before commits. (execute `pre-commit install` to install the git hook.)
|
||||
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 run black,
|
||||
isort and pyupgrade before commits. (execute `pre-commit install` to install
|
||||
the git hook.)
|
||||
|
||||
|
||||
Copyright
|
||||
|
|
Loading…
Reference in New Issue