kopia lustrzana https://github.com/rtts/django-simplecms
Add useful pre-commit hooks
rodzic
c4300bafa1
commit
eb969cfb8e
|
@ -1,14 +1,27 @@
|
||||||
repos:
|
repos:
|
||||||
|
|
||||||
# Remove unused imports
|
- repo: https://github.com/rtts/djhtml
|
||||||
|
rev: main
|
||||||
|
hooks:
|
||||||
|
- id: djhtml
|
||||||
|
|
||||||
- repo: https://github.com/myint/autoflake
|
- repo: https://github.com/myint/autoflake
|
||||||
rev: v1.4
|
rev: master
|
||||||
hooks:
|
hooks:
|
||||||
- id: autoflake
|
- id: autoflake
|
||||||
args: ['--in-place', '--remove-all-unused-imports']
|
args: ['--in-place', '--remove-all-unused-imports']
|
||||||
|
|
||||||
# Sort imports
|
- repo: https://github.com/pycqa/isort
|
||||||
- repo: https://github.com/PyCQA/isort
|
rev: main
|
||||||
rev: 5.7.0
|
|
||||||
hooks:
|
hooks:
|
||||||
- id: isort
|
- id: isort
|
||||||
|
|
||||||
|
- repo: https://github.com/pycqa/flake8
|
||||||
|
rev: master
|
||||||
|
hooks:
|
||||||
|
- id: flake8
|
||||||
|
|
||||||
|
- repo: https://github.com/psf/black
|
||||||
|
rev: main
|
||||||
|
hooks:
|
||||||
|
- id: black
|
||||||
|
|
|
@ -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
|
|
@ -0,0 +1,4 @@
|
||||||
|
[flake8]
|
||||||
|
max-line-length = 88
|
||||||
|
select = C,E,F,W,B,B950
|
||||||
|
extend-ignore = E203, E501
|
|
@ -0,0 +1,4 @@
|
||||||
|
[flake8]
|
||||||
|
max-line-length = 88
|
||||||
|
select = C,E,F,W,B,B950
|
||||||
|
extend-ignore = E203, E501
|
Ładowanie…
Reference in New Issue