Add black to pre-commit, ignoring all files

Each of the lines in this "exclude" pattern will get a dedicated PR
to remove it and would blacken that part of the codebase.
This commit is contained in:
Pradyun Gedam 2020-09-24 00:36:02 +05:30
vanhempi facc1e5658
commit e5deff909c
No known key found for this signature in database
GPG avaimen ID: FF99710C4332258E
1 muutettua tiedostoa jossa 36 lisäystä ja 0 poistoa

Näytä tiedosto

@ -16,6 +16,42 @@ repos:
- id: trailing-whitespace
exclude: .patch
- repo: https://github.com/psf/black
rev: 20.8b1
hooks:
- id: black
exclude: |
(?x)
^docs/|
^src/pip/_internal/cli|
^src/pip/_internal/commands|
^src/pip/_internal/distributions|
^src/pip/_internal/index|
^src/pip/_internal/models|
^src/pip/_internal/network|
^src/pip/_internal/operations|
^src/pip/_internal/req|
^src/pip/_internal/resolution|
^src/pip/_internal/utils|
^src/pip/_internal/vcs|
^src/pip/_internal/\w+\.py$|
^src/pip/__main__.py$|
^tools/|
# Tests
^tests/conftest.py|
^tests/yaml|
^tests/lib|
^tests/data|
^tests/unit|
^tests/functional/(?!test_install)|
^tests/functional/test_install|
# Files in the root of the repository
^setup.py|
^noxfile.py|
# A blank ignore, to avoid merge conflicts later.
^$
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.3
hooks: