misc: add pyupgrade files/notes (#55519)
This commit is contained in:
parent
7bc0fcadff
commit
fdd3f15aa7
|
@ -4,3 +4,5 @@
|
|||
86d946adcdc784693d733131c2aecafc6caa8cbb
|
||||
# misc: remove unicode prefixed strings
|
||||
a265c6267e75c831b8294a760f94b9d6cffb92ea
|
||||
# misc: apply pyupgrade
|
||||
7bc0fcadffd16564cc200cb2f32fae80b3c3a5cf
|
||||
|
|
|
@ -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']
|
||||
|
|
8
README
8
README
|
@ -83,6 +83,14 @@ isort is used to format the imports, using those parameter:
|
|||
|
||||
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 run black,
|
||||
isort and pyupgrade before commits. (execute `pre-commit install` to install
|
||||
the git hook.)
|
||||
|
||||
Support
|
||||
=======
|
||||
|
||||
|
|
Loading…
Reference in New Issue