-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
110 lines (101 loc) · 2.86 KB
/
.pre-commit-config.yaml
File metadata and controls
110 lines (101 loc) · 2.86 KB
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
110
# To install the git pre-commit hook run:
# pre-commit install --install-hooks
# To update the pre-commit hooks run:
# pre-commit autoupdate
exclude: '^(.tox/|docs/source/conf.py$|^toxfile.py$|^setup.py$)'
repos:
- repo: meta
hooks:
- id: check-useless-excludes
- id: check-hooks-apply
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
#- id: check-symlinks
- id: debug-statements
#- id: requirements-txt-fixer
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: fix-encoding-pragma
args: ['--remove']
- id: trailing-whitespace
- id: end-of-file-fixer
exclude: '^(docs/swd/)'
- id: mixed-line-ending
args: [--fix=lf]
- id: check-toml
- id: check-yaml
#- id: check-json
- repo: https://github.com/ambv/black
rev: 25.1.0
hooks:
- id: black
name: "Format code"
language_version: python3
- repo: https://github.com/pycqa/isort
rev: 6.0.1
hooks:
- id: isort
args: [--settings-path=pyproject.toml]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.16.0
hooks:
- id: mypy
args:
- --follow-imports=normal
- --install-types
- --non-interactive
- --check-untyped-defs
additional_dependencies:
- "munch-stubs @ git+https://github.com/VCTLabs/munch-stubs.git@main"
- "python-to-mermaid"
- "doorstop"
exclude: '^(docs/|tests/)'
- repo: "https://github.com/asottile/blacken-docs"
rev: "1.19.1"
hooks:
- id: "blacken-docs"
name: "Format docs (blacken-docs)"
args: ["-l", "64"]
additional_dependencies:
- "black==23.1.0"
- repo: https://github.com/PyCQA/doc8
rev: v1.1.2
hooks:
- id: doc8
#exclude: CHANGELOG\.rst$
args:
- '--max-line-length=136'
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: rst-backticks
#exclude: CHANGELOG\.rst$
- id: rst-directive-colons
- id: rst-inline-touching-normal
- repo: https://github.com/myint/autoflake
rev: v2.3.1
hooks:
- id: autoflake
files: src/
args:
- --in-place
- --remove-all-unused-imports
- --remove-duplicate-keys
- --remove-unused-variables
- repo: https://github.com/PyCQA/flake8
rev: 7.2.0
hooks:
- id: flake8
files: src/
additional_dependencies: ["flake8-bugbear"]
- repo: https://github.com/PyCQA/bandit
rev: 1.8.3
hooks:
- id: bandit
args: ["-ll", "-q", "-r", "-c", "pyproject.toml"]
additional_dependencies: ["bandit[toml]"]
files: src/