misc: add pyupgrade files/notes (#55868)
This commit is contained in:
parent
f4615c5061
commit
70d699b0a4
|
@ -2,3 +2,5 @@
|
|||
47d67c395ef124ea4534ea7c56d48d4e302db430
|
||||
# misc: apply isort (#52797)
|
||||
29bc8e66a978b1bbadbc05186599a70ce1b8ef98
|
||||
# misc: apply pyupgrade (#55868)
|
||||
f4615c506194cf4eace0af551f14f54552f09dc5
|
||||
|
|
|
@ -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
|
@ -100,8 +100,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.)
|
||||
|
||||
|
||||
License
|
||||
|
|
Loading…
Reference in New Issue