Add useful pre-commit hooks

main
Jaap Joris Vens 2021-06-30 00:03:22 +02:00
rodzic c4300bafa1
commit eb969cfb8e
4 zmienionych plików z 53 dodań i 5 usunięć

Wyświetl plik

@ -1,14 +1,27 @@
repos:
# Remove unused imports
- repo: https://github.com/rtts/djhtml
rev: main
hooks:
- id: djhtml
- repo: https://github.com/myint/autoflake
rev: v1.4
rev: master
hooks:
- id: autoflake
args: ['--in-place', '--remove-all-unused-imports']
# Sort imports
- repo: https://github.com/PyCQA/isort
rev: 5.7.0
- repo: https://github.com/pycqa/isort
rev: main
hooks:
- id: isort
- repo: https://github.com/pycqa/flake8
rev: master
hooks:
- id: flake8
- repo: https://github.com/psf/black
rev: main
hooks:
- id: black

Wyświetl plik

@ -0,0 +1,27 @@
repos:
- repo: https://github.com/rtts/djhtml
rev: main
hooks:
- id: djhtml
- repo: https://github.com/myint/autoflake
rev: master
hooks:
- id: autoflake
args: ['--in-place', '--remove-all-unused-imports']
- repo: https://github.com/pycqa/isort
rev: main
hooks:
- id: isort
- repo: https://github.com/pycqa/flake8
rev: master
hooks:
- id: flake8
- repo: https://github.com/psf/black
rev: main
hooks:
- id: black

Wyświetl plik

@ -0,0 +1,4 @@
[flake8]
max-line-length = 88
select = C,E,F,W,B,B950
extend-ignore = E203, E501

4
setup.cfg 100644
Wyświetl plik

@ -0,0 +1,4 @@
[flake8]
max-line-length = 88
select = C,E,F,W,B,B950
extend-ignore = E203, E501