Projet

Général

Profil

0001-build-add-pre-commit-configuration-to-run-black-4978.patch

Frédéric Péters, 04 janvier 2021 09:25

Télécharger (1,44 ko)

Voir les différences:

Subject: [PATCH] build: add pre-commit configuration to run black (#49784)

 .pre-commit-config.yaml | 8 ++++++++
 README                  | 7 ++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)
 create mode 100644 .pre-commit-config.yaml
.pre-commit-config.yaml
1
# See https://pre-commit.com for more information
2
# See https://pre-commit.com/hooks.html for more hooks
3
repos:
4
-   repo: https://github.com/psf/black
5
    rev: 20.8b1
6
    hooks:
7
    - id: black
8
      args: ['--target-version', 'py35', '--skip-string-normalization', '--line-length', '110']
README
32 32
Code Style
33 33
----------
34 34

  
35
black --target-version py35 --skip-string-normalization --line-length 110
35
black is used to format the code, using thoses parameters:
36

  
37
    black --target-version py35 --skip-string-normalization --line-length 110
38

  
39
There is .pre-commit-config.yaml to use pre-commit to automatically run black
40
before commits. (execute `pre-commit install` to install the git hook.)
36 41

  
37 42

  
38 43
Tests
39
-