-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
40 lines (39 loc) · 1.71 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0 # Use the ref you want to point at
hooks:
- id: trailing-whitespace # Trims trailing whitespace.
- id: end-of-file-fixer # Makes sure files end in a newline and only a newline.
- id: check-yaml # Checks yaml files for syntax validity
- id: check-added-large-files # Checks for large files being added to git, > 10MB
args: ['--maxkb=5000']
exclude: "notebooks"
- id: check-case-conflict # Checks for files whose names differ only in case
- id: check-merge-conflict # Checks for files that contain merge conflict strings.
- id: debug-statements # Prevents the accidental commit of breakpoint(), pdb.set_trace(), etc.
- id: check-ast # Simply check whether files parse as valid python.
- id: check-docstring-first # Checks for a common error of placing code before the docstring.
- id: check-executables-have-shebangs # Checks that executable files have a shebang.
- id: detect-private-key # Detects the presence of private keys.
- id: detect-aws-credentials
args:
- --allow-missing-credentials
- repo: https://github.com/ambv/black # automatic format code style
rev: 22.3.0
hooks:
- id: black
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v3.2.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
args: []
- repo: local
hooks:
- id: unittest
name: unittest
entry: python -m unittest discover -s tests -p 'test_*.py'
language: system
'types': [ python ]
pass_filenames: false
stages: [ commit ]