Projet

Général

Profil

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

Lauréline Guérin, 27 juillet 2021 15:25

Télécharger (1,88 ko)

Voir les différences:

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

 .git-blame-ignore-revs  | 2 ++
 .pre-commit-config.yaml | 5 +++++
 README                  | 9 +++++++--
 3 files changed, 14 insertions(+), 2 deletions(-)
.git-blame-ignore-revs
11 11
30bbc8c90f35f0cc49bfdb4244ff856d6766032d
12 12
# misc: apply isort (#52856)
13 13
34224c56aa3b855a6cfcf96af8f315c620eaa430
14
# misc: apply pyupgrade (#55867)
15
1ec4ad937602a52db6913e8ee9103fdb59be59f7
.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
40 40

  
41 41
    isort --profile black --line-length 110
42 42

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

  
45
    pyupgrade --keep-percent-format --py37-plus
46

  
47
There is .pre-commit-config.yaml to use pre-commit to automatically run black,
48
isort and pyupgrade before commits. (execute `pre-commit install` to install
49
the git hook.)
45 50

  
46 51

  
47 52
Tests
48
-