-
Notifications
You must be signed in to change notification settings - Fork 2
/
.pre-commit-config.yaml
55 lines (52 loc) · 1.7 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
default_language_version:
python: python3.9
default_stages: [commit, push]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
- id: black
# args: ["--line-length=88", "--check", "--diff", "--force-exclude=migrations", "src/"]
args: ["--line-length=88", "--force-exclude=migrations", "src/"]
types: [python]
entry: black
- repo: https://github.com/PyCQA/flake8.git
rev: "7.0.0"
hooks:
- id: flake8
name: flake8
entry: flake8
additional_dependencies: ["flake8-django==0.0.4", "pylint-django==2.0.11"]
types: [python]
args: ["--max-complexity=30", "--max-line-length=88", "--ignore=DJ01,DJ08,W503,ANN101", "--exclude=docs/*", "src/", "setup.py"]
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
args: ["--multi-line=3", "--lbt=1", "--trailing-comma", "--force-grid-wrap=0", "--use-parentheses", "--ensure-newline-before-comments", "--line-length=88"]
- repo: local
hooks:
- id: python-check-pdb
name: check pdb
description: 'PDB check inside code'
entry: '^\s?[^#]+\.set_trace\(\)'
language: pygrep
types: [python]
- repo: https://github.com/collective/zpretty
rev: 3.1.0
hooks:
- id: zpretty
name: zpretty
- repo: https://github.com/regebro/pyroma
rev: '4.2'
hooks:
- id: pyroma