-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.pre-commit-config.yaml
67 lines (67 loc) · 2.02 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
# .pre-commit-config.yaml
default_language_version:
python: python3.11
default_stages: [commit, push]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks # general checks
rev: v4.5.0
hooks:
- id: check-added-large-files
args: ['--maxkb=1024']
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/psf/black # black formatter
rev: 23.11.0
hooks:
- id: black
files: ^src/
- repo: https://github.com/PyCQA/isort # isort sort imports
rev: 5.13.0
hooks:
- id: isort
files: ^src/
- repo: https://github.com/pycqa/flake8 # flake8 linter
rev: 6.1.0
hooks:
- id: flake8
files: ^src/
- repo: https://github.com/pycqa/bandit # basic security checks for python code
rev: 1.7.6
hooks:
- id: bandit
files: ^src/
args: ["--config", "pyproject.toml"]
additional_dependencies: ["bandit[toml]"]
- repo: https://github.com/econchick/interrogate # check for docstrings
rev: 1.5.0
hooks:
- id: interrogate
files: ^src/
args: [--config, pyproject.toml]
pass_filenames: false # see https://github.com/econchick/interrogate/issues/60#issuecomment-1180262851
- repo: https://gitlab.com/iam-cms/pre-commit-hooks # apply Apache2 header
rev: v0.4.0
hooks:
- id: apache-license
files: ^src/
args: ["-a", "Oreum Industries"]