-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
83 lines (82 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
default_language_version:
python: python3
repos:
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.8.0
hooks:
- id: isort
name: isort
args: ["--profile", "black"]
description: Sort python imports.
language_version: python3
- repo: https://github.com/ambv/black
rev: 20.8b1
hooks:
- id: black
name: black
description: "Black: The uncompromising Python code formatter"
language_version: python3
exclude: ^docs/
- repo: https://github.com/PyCQA/bandit
rev: '1.7.0'
hooks:
- id: bandit
name: bandit
description: Find common security issues in your Python code using bandit
args: [-l, --recursive, -x, tests]
files: .py$
- repo: https://github.com/Lucas-C/pre-commit-hooks-safety
rev: v1.2.1
hooks:
- id: python-safety-dependencies-check
name: safety
description: Analyze your Python requirements for known security vulnerabilities
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.0
hooks:
- id: flake8
name: flake8
args: ['--config=setup.cfg']
description: Check python style with flake8.
exclude: ^docs/|setup.py|__init__.py|^tests/
additional_dependencies: ["flake8-docstrings",
"flake8-bugbear",
"flake8-comprehensions"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: check-merge-conflict
name: check-merge-conflict
description: Check for files that contain merge conflict strings.
- id: debug-statements
name: debug-statements
description: Check for debugger imports and py37+ breakpoint() calls in python source.
- id: detect-private-key
name: detect-private-key
description: Checks for the existence of private keys.
- id: end-of-file-fixer
name: end-of-file-fixer
description: Makes sure files end in a newline and only a newline.
- id: trailing-whitespace
name: trailing-whitespace
description: Trims trailing whitespace
- id: mixed-line-ending
args: [--fix=lf]
- id: check-json
name: check-json
description: Attempts to load all json files to verify syntax.
- id: check-yaml
name: check-yaml
description: Attempts to load all yaml files to verify syntax.
- id: requirements-txt-fixer
name: requirements-txt-fixer
description: Sorts entries in requirements.txt
- repo: local
hooks:
- id: tests
name: run tests
description: Run tests using pytest.
entry: pytest -v
language: system
types: [python]
stages: [push]