-
Notifications
You must be signed in to change notification settings - Fork 6
/
.pre-commit-config.yaml
107 lines (96 loc) · 2.94 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
default_install_hook_types:
- "commit-msg"
- "pre-commit"
default_language_version:
python: &python_version "python3.12"
exclude: ^(archive|assets|migrations)/.*|.*/(migrations|test-data|vendor)/.*|.*\.svg$
minimum_pre_commit_version: "1.17.0"
repos:
- repo: "https://github.com/commitizen-tools/commitizen"
rev: "v3.29.0"
hooks:
- id: "commitizen"
stages: ["commit-msg"]
- repo: "https://github.com/Kludex/no-optional"
rev: "0.4.0"
hooks:
- id: "no_optional"
name: "Format code (no-optional)"
- repo: "https://github.com/PyCQA/isort"
rev: "5.13.2"
hooks:
- id: "isort"
name: "Format code (isort)"
exclude: ^docs/.*$
- repo: "https://github.com/psf/black-pre-commit-mirror"
rev: "24.8.0"
hooks:
- id: "black"
name: "Format code (black)"
exclude: ^docs/.*$
- repo: "https://github.com/asottile/blacken-docs"
rev: "1.18.0"
hooks:
- id: "blacken-docs"
name: "Format docs (blacken-docs)"
args: ["-l", "64"]
additional_dependencies:
- "black==24.8.0"
- repo: "https://github.com/pre-commit/pre-commit-hooks"
rev: "v4.6.0"
hooks:
- id: "end-of-file-fixer"
- id: "trailing-whitespace"
- id: "check-json"
- id: "check-toml"
- id: "check-yaml"
- repo: "https://github.com/pre-commit/pygrep-hooks"
rev: "v1.10.0"
hooks:
- id: "python-check-blanket-noqa"
- id: "python-check-blanket-type-ignore"
- id: "rst-backticks"
- id: "rst-directive-colons"
- id: "rst-inline-touching-normal"
- repo: "https://github.com/PyCQA/flake8"
rev: "7.1.1"
hooks:
- id: "flake8"
name: "Lint code (flake8)"
additional_dependencies: &flake8_additional_dependencies
- "flake8-bugbear==24.4.26"
- "flake8-builtins==2.5.0"
- "flake8-comprehensions==3.15.0"
- "flake8-implicit-str-concat==0.4.0"
- "flake8-isort==6.1.1"
- "flake8-logging==1.6.0"
- "flake8-mutable==1.2.0"
- "flake8-pie==0.16.0"
- "flake8-quotes==3.4.0"
- "flake8-string-format==0.3.0"
- "flake8-tidy-imports==4.10.0"
- "flake8-variables-names==0.0.6"
- "flake8==7.1.1"
- "pep8-naming==0.14.1"
exclude: ^docs/.*$
- repo: "https://github.com/asottile/yesqa"
rev: "v1.5.0"
hooks:
- id: "yesqa"
name: "Lint code (yesqa)"
additional_dependencies: *flake8_additional_dependencies
exclude: ^docs/.*$
- repo: "local"
hooks:
- id: "mypy"
name: "Lint code (mypy)"
entry: ".venv/bin/mypy"
language: "python"
"types": ["python"]
require_serial: true
exclude: ^(.*/)?(docs|migrations|tests)/.*$
- repo: "https://github.com/shellcheck-py/shellcheck-py"
rev: "v0.10.0.1"
hooks:
- id: "shellcheck"
name: "Lint scripts (shellcheck)"