Projet

Général

Profil

0001-misc-add-isort-52797.patch

Lauréline Guérin, 06 avril 2021 21:32

Télécharger (1,39 ko)

Voir les différences:

Subject: [PATCH 1/2] misc: add isort (#52797)

 .pre-commit-config.yaml | 5 +++++
 README                  | 6 +++++-
 2 files changed, 10 insertions(+), 1 deletion(-)
.pre-commit-config.yaml
6 6
    hooks:
7 7
    - id: black
8 8
      args: ['--target-version', 'py37', '--skip-string-normalization', '--line-length', '110']
9
-   repo: https://github.com/PyCQA/isort
10
    rev: 5.7.0
11
    hooks:
12
    - id: isort
13
      args: ['--profile', 'black', '--line-length', '110']
README
96 96

  
97 97
    black --target-version py37 --skip-string-normalization --line-length 110
98 98

  
99
There is .pre-commit-config.yaml to use pre-commit to automatically run black
99
isort is used to format the imports, using those parameters:
100

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

  
103
There is .pre-commit-config.yaml to use pre-commit to automatically run black and isort
100 104
before commits. (execute `pre-commit install` to install the git hook.)
101 105

  
102 106

  
103
-