misc: add pyupgrade files/notes (#55490)

This commit is contained in:
Lauréline Guérin 2021-07-09 14:40:01 +02:00
parent ff0d3779c0
commit 648140c7bb
No known key found for this signature in database
GPG Key ID: 1FAB9B9B4F93D473
3 changed files with 14 additions and 2 deletions

View File

@ -6,3 +6,5 @@ a11be8fa590ad3d02a903dacb8393336b989a1a6
08f1431a665aec6586960e78cbfda6da47aa6862
# misc: apply isort (#52224)
48470c50c0e9b56e989cfbcdcec433de0cc8479a
# misc: apply pyupgrade (#55490)
ff0d3779c024ba3a0109b91d9337aadd06b06788

View File

@ -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
View File

@ -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