0001-build-add-pre-commit-configuration-to-run-black-4978.patch
.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 |
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 |
pyproject.toml | ||
---|---|---|
1 |
[tool.black] |
|
2 |
line-length = 110 |
|
3 |
target-version = ['py35'] |
|
4 |
skip-string-normalization = true |
|
0 |
- |