-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
97 lines (87 loc) · 2.72 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: debug-statements
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: check-merge-conflict
- id: check-executables-have-shebangs
- id: check-ast
- id: check-byte-order-marker
- id: check-json
- id: check-symlinks
- id: check-vcs-permalinks
- id: check-xml
- id: check-yaml
- id: detect-private-key
- id: forbid-new-submodules
- id: no-commit-to-branch
- id: check-docstring-first
- repo: local
hooks:
- id: check-env-file-in-gitignore
name: check_env_file_in_gitignore
description: Check that .env file is ignored in .gitignore
language: system
entry: bash -c 'if grep -Fxq ".env" .gitignore; then exit 0; else exit 1; fi'
- id: check-datetime-now
name: check_datetime_now
description: Prefer datetime.utcnow()
language: pygrep
entry: 'datetime\.now\(\)'
types: [python]
- repo: https://github.com/pycqa/flake8
rev: 4.0.1
hooks:
- id: flake8
description: Run flake8 on Python files
args:
- --max-line-length=100
- --max-doc-length=120
- --max-complexity=10
- --ignore=E501,W503,E203,F401,F811
- repo: https://github.com/timothycrosley/isort
rev: 5.12.0
hooks:
- id: isort
description: Sort imports in Python code
additional_dependencies: ["toml"]
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.9.0
hooks:
- id: python-check-mock-methods
description: Check that all mock methods are called
- repo: https://github.com/python/black
rev: 22.3.0
hooks:
- id: black
description: Black is a tool for reformatting Python code to make it more readable
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.961
hooks:
- id: mypy
description: 'Mypy type checker'
additional_dependencies:
- pydantic
- repo: https://github.com/PyCQA/bandit
rev: 1.7.4
hooks:
- id: bandit
name: bandit
description: Bandit is a tool for finding common security issues in Python code
entry: bandit -c pyproject.toml -q
additional_dependencies: ["toml"]
- repo: https://github.com/twu/skjold
rev: v0.6.0
hooks:
- id: skjold
description: Security audit Python project dependencies against security advisory databases
- repo: https://github.com/PyCQA/pydocstyle
rev: 6.1.1
hooks:
- id: pydocstyle
exclude: migrations/
args:
- --convention=google
additional_dependencies: [ "toml" ]