-
Notifications
You must be signed in to change notification settings - Fork 7
/
.pre-commit-config.yaml
95 lines (85 loc) · 2.06 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
# See https://pre-commit.com for more information
fail_fast: true
default_install_hook_types: [commit-msg, pre-commit, pre-push]
repos:
- repo: https://github.com/qoomon/git-conventional-commits
rev: 'v2.6.7'
hooks:
- id: conventional-commits
args: ["-c", ".git-commits.yaml"]
stages: ["commit-msg"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-case-conflict
stages: ["pre-commit"]
- id: check-merge-conflict
stages: ["pre-commit"]
- id: check-added-large-files
stages: ["pre-commit"]
args: ['--maxkb=5000']
- id: check-ast
stages: ["pre-commit"]
- id: check-executables-have-shebangs
stages: ["pre-commit"]
- id: check-symlinks
stages: ["pre-commit"]
- id: check-toml
stages: ["pre-commit"]
- id: check-yaml
stages: ["pre-commit"]
- id: debug-statements
stages: ["pre-commit"]
- id: end-of-file-fixer
stages: ["pre-commit"]
exclude: |
(?x)^(
_pb2\.py|
_pb2_grpc\.py
)
- id: trailing-whitespace
stages: ["pre-commit"]
- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
- id: black
exclude: |
(?x)(
_pb2\.py|
_pb2_grpc\.py
)
stages: ["pre-commit"]
- repo: https://github.com/python-poetry/poetry
rev: '1.8.0'
hooks:
- id: poetry-check
files: ^(.*/)?pyproject\.toml$
stages: ["pre-commit"]
- id: poetry-lock
files: ^(.*/)?(poetry\.lock|pyproject\.toml)$
args: ["--no-update"]
stages: ["pre-commit"]
- repo: local
hooks:
- id: ruff
name: ruff
entry: poetry run ruff check peewee_aio
language: system
pass_filenames: false
files: \.py$
stages: ["pre-commit"]
- id: mypy
name: mypy
entry: poetry run mypy
language: system
pass_filenames: false
files: \.py$
stages: ["pre-push"]
- id: pytest
name: pytest
entry: poetry run pytest tests
language: system
pass_filenames: false
files: \.py$
stages: ["pre-push"]
# See https://pre-commit.com/hooks.html for more hooks