Add pre-commit config
This commit is contained in:
parent
c31089fd0f
commit
64c58260d9
2 changed files with 42 additions and 0 deletions
34
.pre-commit-config.yaml
Executable file
34
.pre-commit-config.yaml
Executable file
|
@ -0,0 +1,34 @@
|
|||
exclude: \.min\.(js|css)$|/generated/
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v3.4.0
|
||||
hooks:
|
||||
- id: check-ast
|
||||
types: [python]
|
||||
- id: check-json
|
||||
types: [json]
|
||||
- id: check-toml
|
||||
types: [toml]
|
||||
- id: check-xml
|
||||
types: [xml]
|
||||
- id: check-yaml
|
||||
types: [yaml]
|
||||
- id: end-of-file-fixer
|
||||
- id: check-merge-conflict
|
||||
- id: pretty-format-json
|
||||
args:
|
||||
- --autofix
|
||||
- --no-sort-keys
|
||||
- id: trailing-whitespace
|
||||
args:
|
||||
- --markdown-linebreak-ext=md
|
||||
- repo: https://github.com/timothycrosley/isort
|
||||
rev: 5.8.0
|
||||
hooks:
|
||||
- id: isort
|
||||
types: [python]
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 20.8b1
|
||||
hooks:
|
||||
- id: black
|
||||
types: [python]
|
|
@ -21,7 +21,15 @@ django-environ-2 = "^2.1.0"
|
|||
[tool.poetry.dev-dependencies]
|
||||
django-debug-toolbar = "^3.2.1"
|
||||
django-dotenv = "^1.4.2"
|
||||
pre-commit = "^2.13.0"
|
||||
pytest = "^6.2.4"
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core>=1.0.0"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
|
||||
[tool.black]
|
||||
target-version = ['py38']
|
||||
|
||||
[tool.isort]
|
||||
profile = "black"
|
||||
|
|
Loading…
Reference in a new issue