Projet

Général

Profil

0002-misc-add-pyupgrade-files-notes-55868.patch

Lauréline Guérin, 27 juillet 2021 16:30

Télécharger (1,85 ko)

Voir les différences:

Subject: [PATCH 2/2] misc: add pyupgrade files/notes (#55868)

 .git-blame-ignore-revs  | 2 ++
 .pre-commit-config.yaml | 5 +++++
 README                  | 9 +++++++--
 3 files changed, 14 insertions(+), 2 deletions(-)
.git-blame-ignore-revs
2 2
47d67c395ef124ea4534ea7c56d48d4e302db430
3 3
# misc: apply isort (#52797)
4 4
29bc8e66a978b1bbadbc05186599a70ce1b8ef98
5
# misc: apply pyupgrade (#55868)
6
7db2d9a6cde3ca644f4041f76f41ba2304f58117
.pre-commit-config.yaml
11 11
    hooks:
12 12
    - id: isort
13 13
      args: ['--profile', 'black', '--line-length', '110']
14
-   repo: https://github.com/asottile/pyupgrade
15
    rev: v2.20.0
16
    hooks:
17
    - id: pyupgrade
18
      args: ['--keep-percent-format', '--py37-plus']
README
100 100

  
101 101
    isort --profile black --line-length 110
102 102

  
103
There is .pre-commit-config.yaml to use pre-commit to automatically run black and isort
104
before commits. (execute `pre-commit install` to install the git hook.)
103
pyupgrade is used to automatically upgrade syntax, using those parameters:
104

  
105
    pyupgrade --keep-percent-format --py37-plus
106

  
107
There is .pre-commit-config.yaml to use pre-commit to automatically run black,
108
isort and pyupgrade before commits. (execute `pre-commit install` to install
109
the git hook.)
105 110

  
106 111

  
107 112
License
108
-