-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.pre-commit-config.yaml
94 lines (88 loc) · 2.67 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
minimum_pre_commit_version: 3.0.0
default_install_hook_types:
- pre-commit
- pre-push
# default_stages: [commit]
exclude: (wettelijke-documenten|docs)
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.3.4
hooks:
- id: ruff
types_or: [python, pyi, jupyter]
args: ["--fix", "--extend-select", "I"]
# Run the formatter.
- id: ruff-format
types_or: [python, pyi, jupyter]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
description: "Prettier is an opinionated code formatter for various languages, including JSON, YAML, Markdown, and more."
additional_dependencies:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: end-of-file-fixer
description: "Ensures that a file is either empty, or ends with one newline."
- id: mixed-line-ending
description: "Replaces or checks mixed line ending."
- id: trailing-whitespace
description: "Trims trailing whitespace."
exclude: '\.md$'
- id: debug-statements
description: "Check for debugger imports and py37+ `breakpoint()` calls in Python."
stages:
- "pre-push"
- "manual"
- id: detect-private-key
description: "Check for the existence of private keys."
stages:
- "pre-push"
- "manual"
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.9.0
hooks:
- id: mypy
additional_dependencies:
[
pydantic==2.*,
types-requests==2.*,
unidecode==1.*,
PyYAML==6.*,
types-pyyaml==6.*,
libcst==1.*,
types-python-dateutil==2.*,
"rdflib==7.*",
]
description: "Mypy is an optional static type checker for Python."
args:
["--strict", "--ignore-missing-imports", "--allow-untyped-decorators"]
exclude: "tests"
stages:
- "pre-push"
- "manual"
- repo: https://github.com/PyCQA/bandit
rev: 1.7.8
hooks:
- id: bandit
description: "Bandit is a tool for finding common security issues in Python code."
entry: bandit
language: python
language_version: python3
types: [python]
require_serial: true
exclude: "tests"
stages:
- "pre-push"
- "manual"
- repo: https://github.com/jsh9/pydoclint
rev: 0.4.1
hooks:
- id: pydoclint
args: [--style=google]
stages:
- "pre-push"
- "manual"