Projet

Général

Profil

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

Valentin Deniaud, 12 juillet 2021 12:04

Télécharger (1,66 ko)

Voir les différences:

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

 .git-blame-ignore-revs  | 2 ++
 .pre-commit-config.yaml | 5 +++++
 README                  | 8 ++++++++
 3 files changed, 15 insertions(+)
.git-blame-ignore-revs
4 4
86d946adcdc784693d733131c2aecafc6caa8cbb
5 5
# misc: remove unicode prefixed strings
6 6
a265c6267e75c831b8294a760f94b9d6cffb92ea
7
# misc: apply pyupgrade
8
7bc0fcadffd16564cc200cb2f32fae80b3c3a5cf
.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
83 83

  
84 84
    isort --profile black --line-length 110
85 85

  
86
pyupgrade is used to automatically upgrade syntax, using those parameters:
87

  
88
    pyupgrade --keep-percent-format --py37-plus
89

  
90
There is .pre-commit-config.yaml to use pre-commit to automatically run black,
91
isort and pyupgrade before commits. (execute `pre-commit install` to install
92
the git hook.)
93

  
86 94
Support
87 95
=======
88 96

  
89
-