-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
52 lines (52 loc) · 1.64 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
# .pre-commit-config.yaml
default_language_version:
python: python3.11
default_stages: [pre-commit, pre-push]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks # general checks
rev: v5.0.0
hooks:
- id: check-added-large-files
args: ['--maxkb=4096']
exclude: "([a-zA-Z0-9_]{1,}\\.ipynb|.+?\\.png)"
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: check-json
exclude : ^.vscode/
- id: pretty-format-json
args: ['--autofix']
exclude : ^.vscode/
- id: debug-statements
- id: detect-private-key
- id: check-case-conflict
- id: mixed-line-ending
- id: trailing-whitespace
- id: end-of-file-fixer
# - id: no-commit-to-branch
# args: [--branch, master]
- repo: https://github.com/MarcoGorelli/madforhooks # additional hooks
rev: 0.4.1
hooks:
- id: no-print-statements
files: ^src/
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.3
hooks:
- id: ruff # lint
args: [ --fix]
- id: ruff-format # formatter
- repo: https://github.com/pycqa/bandit # basic security checks for python code
rev: 1.8.0
hooks:
- id: bandit
files: ^src/
args: ["--config", "pyproject.toml"]
additional_dependencies: ["bandit[toml]"]
- repo: https://github.com/econchick/interrogate # check for docstrings
rev: 1.7.0
hooks:
- id: interrogate
files: ^src/
args: [--config, pyproject.toml]
pass_filenames: false # see https://github.com/econchick/interrogate/issues/60#issuecomment-1180262851