-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
109 lines (96 loc) · 2.9 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
exclude: '^$'
fail_fast: false
default_install_hook_types: [pre-commit, pre-push, commit-msg]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-added-large-files
stages: [pre-commit]
- id: check-ast
stages: [pre-commit]
- id: check-docstring-first
stages: [pre-commit]
- id: check-json
stages: [pre-commit]
- id: check-toml
stages: [pre-commit]
- id: check-yaml
args: [--allow-multiple-documents]
stages: [pre-commit]
- id: check-xml
stages: [pre-commit]
- id: check-shebang-scripts-are-executable
stages: [pre-commit]
- id: check-executables-have-shebangs
stages: [pre-commit]
- id: check-merge-conflict
stages: [pre-commit]
- id: check-case-conflict
stages: [pre-commit]
- id: check-symlinks
stages: [pre-commit]
- id: destroyed-symlinks
stages: [pre-commit]
- id: detect-private-key
stages: [pre-commit]
- id: mixed-line-ending
exclude: "(^.idea/|.vscode/)"
stages: [pre-commit]
- id: trailing-whitespace
exclude: "(^.idea/|.vscode/)"
stages: [pre-commit]
- id: end-of-file-fixer
exclude: "(^.idea/|.vscode/)"
stages: [pre-commit]
- id: no-commit-to-branch
args: [--branch, main]
stages: [pre-commit]
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.8.0
hooks:
- id: black
language_version: python3.12
args: [--line-length=120]
exclude: ^.*\b(migrations)\b.*$
stages: [pre-commit]
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
exclude: ^.*\b(migrations)\b.*$
stages: [pre-commit]
- repo: https://github.com/pycqa/flake8
rev: 7.1.1
hooks:
- id: flake8
exclude: ^.*\b(migrations)\b.*$
stages: [pre-commit]
additional_dependencies:
# automated security testing
- flake8-bandit
# do not allow breaking lines with backslashes
- flake8-broken-line
# check for built-ins being used as variables or parameters
- flake8-builtins
# "find likely bugs and design problems in your program"
- flake8-bugbear
# write better comprehensions
- flake8-comprehensions
# catch bugs from implicit concat
- flake8-no-implicit-concat
# attempt to simplify code
- flake8-simplify
# validate names of things
- pep8-naming
- repo: https://github.com/python-poetry/poetry
rev: 1.8.0
hooks:
- id: poetry-check
stages: [pre-commit]
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.29.0
hooks:
- id: commitizen
- id: commitizen-branch
stages: [push]