0002-misc-add-pyugrade-files-notes-69708.patch
.git-blame-ignore-revs | ||
---|---|---|
2 | 2 |
872f39774a43db59ffc4bbddc77ad3a33ba7ead2 |
3 | 3 |
# misc: apply black 22.1.0 |
4 | 4 |
f014f154640dc30fd27662ec6d93ae6e64125ea3 |
5 |
# misc: apply pyupgrade (#69708) |
|
6 |
a107b7ef0e847882dcd6d5fc8c39e8feccc5705e |
.pre-commit-config.yaml | ||
---|---|---|
1 | 1 |
# See https://pre-commit.com for more information |
2 | 2 |
# See https://pre-commit.com/hooks.html for more hooks |
3 | 3 |
repos: |
4 |
- repo: https://github.com/asottile/pyupgrade |
|
5 |
rev: v2.20.0 |
|
6 |
hooks: |
|
7 |
- id: pyupgrade |
|
8 |
args: ['--keep-percent-format', '--py37-plus'] |
|
4 | 9 |
- repo: https://github.com/psf/black |
5 | 10 |
rev: 22.3.0 |
6 | 11 |
hooks: |
README | ||
---|---|---|
184 | 184 | |
185 | 185 |
isort --profile black --line-length 110 |
186 | 186 | |
187 |
There is .pre-commit-config.yaml to use pre-commit to automatically run black and isort |
|
187 |
pyupgrade is used to automatically upgrade syntax, using those parameters: |
|
188 | ||
189 |
pyupgrade --keep-percent-format --py37-plus |
|
190 | ||
191 |
There is .pre-commit-config.yaml to use pre-commit to automatically run these tools |
|
188 | 192 |
before commits. (execute `pre-commit install` to install the git hook.) |
189 | 193 | |
190 | 194 | |
191 |
- |