-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
70 lines (61 loc) · 1.62 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
repos:
# Basic checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-case-conflict
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
# Makes sure all dependencies are in order
- repo: https://github.com/python-poetry/poetry
rev: 1.7.1
hooks:
- id: poetry-lock
- id: poetry-check
- id: poetry-install
# Cleans up code formatting
- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
- id: black
# Sorts import statements
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
# Checks for missing type annotations
- repo: https://github.com/nathanvaughn/pyleft
rev: v1.2.2
hooks:
- id: pyleft
# Type-checks codebase
- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.370
hooks:
- id: pyright
# Performs more OCD checks
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.4
hooks:
- id: ruff
args: [--exit-non-zero-on-fix]
# Formats non-Python code
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: prettier
# Checks for common security issues
- repo: https://github.com/PyCQA/bandit
rev: 1.7.8
hooks:
- id: bandit
args: ["-c", "pyproject.toml"]
additional_dependencies: ["bandit[toml]"]
- repo: https://github.com/Lucas-C/pre-commit-hooks-safety
rev: v1.3.1
hooks:
- id: python-safety-dependencies-check
files: pyproject.toml