-
Notifications
You must be signed in to change notification settings - Fork 1
/
pre-commit-config.yaml
30 lines (29 loc) · 1.36 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
repos :
- repo: https://github.com/pre-commit/pre-commit-hooks
rev : v4.1.0
hooks:
#list of definitions and supported hooks : https://pre-commit.com/hooks.html
- id: trailing whtespace #removes any whitespace at the end of lines
- id: check-toml # check toml syntax by loading all toml files
- id: check-json # check json syntax by loading all json files
- id: check-merge-confict # check for files with merge conflict strings
args: ["--assume-in-merge"] # and run this check even when not explicitly in a merge
- id: check-added-large-files # check that no large files have been added
args: ['--maxkb-10240'] # where large means 10MB+
- id : debug-statements # check for python debug statements (import pdb, breakpoint , etc)
- id: detect-private-key #checks for private keys (BEGIN X PRIVATE KEY,etc)
- id: pretty-format-json # cleaner json files
# black for python autoformatting
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id : black
- repo: https://github.com/PyCQA/flake8
rev: 3.9.2
hooks:
- id: flake8
additional_dependencies: [
flake8-bandit, flake8-bugbear, flake8-docstrings,
flake8-import-order, darglint, mypy, pycodestyle, pydocstyle]
args: ["--config", ".flake8"]
# additional configuration of flake8 and extensions in .flake8