-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.pre-commit-config.yaml
75 lines (68 loc) · 1.93 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
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
# See https://github.com/pre-commit/pre-commit-hooks/blob/main/.pre-commit-hooks.yaml for list of hooks
# List taken from suggestions in https://www.b-list.org/weblog/2022/dec/19/boring-python-code-quality/
- id: check-added-large-files
- id: check-ast
- id: check-byte-order-marker
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-vcs-permalinks
- id: check-merge-conflict
- id: check-json
- id: check-yaml
- id: check-toml
- id: check-xml
- id: debug-statements
- id: detect-aws-credentials
- id: detect-private-key
- id: requirements-txt-fixer
- id: trailing-whitespace
- id: no-commit-to-branch
- repo: https://github.com/asottile/pyupgrade
rev: v3.16.0
hooks:
- id: pyupgrade
args: [--py312-plus]
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.9.0
hooks:
- id: python-check-blanket-noqa
- id: python-check-blanket-type-ignore
- id: python-check-mock-methods
- repo: https://github.com/crate-ci/typos
rev: v1.23.3
hooks:
- id: typos
- repo: local
hooks:
- id: mypy
name: mypy
language: system
types: [python]
entry: mypy
require_serial: true
- id: ruff-lint
name: ruff
language: system
types: [python]
entry: "ruff check"
args: [--fix, --exit-non-zero-on-fix]
require_serial: true
- id: ruff-format
name: ruff_format
language: system
types: [python]
entry: "ruff format"
require_serial: true
- id: pytest
name: pytest
language: system
types: [python]
entry: pytest
pass_filenames: false
require_serial: true