-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
43 lines (39 loc) · 1.13 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
repos:
- repo: local
hooks:
- id: black
name: black
entry: black
language: system
types: [python]
- id: pylint
name: pylint
entry: pylint
language: system
files: \.py$
args: [
"-rn", # Disable the full report
"-sn", # Disable the overall score
"--rcfile=.pylintrc", # Use the .pylintrc file in the root directory
"--load-plugins=pylint.extensions.docparams", # Load the docparams plugin to check docstring parameter consistency
]
- id: requirements
name: requirements
entry: bash -c 'venv/bin/pip3 freeze > requirements.txt; git add requirements.txt'
language: system
pass_filenames: false
stages: [commit]
- id: mypy
name: mypy
entry: mypy
language: system
files: \.py$
args: [
"--config-file=mypy.ini", # Use the mypy.ini file in the root directory
]
- id: test
name: test
entry: pytest
language: system
files: tests/.*\.py$
stages: [commit, push]