-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
49 lines (43 loc) · 1.1 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
ci:
autoupdate_schedule: monthly
fail_fast: true
repos:
# Commit message formatting check
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.29.0
hooks:
- id: commitizen
stages: [commit-msg]
# Linting and Formatting with Ruff
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.3
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
- id: ruff-format
# Python Static Type Checking
- repo: local
hooks:
- id: mypy
name: mypy
args: [--pretty]
description: run mypy in current environment (with typed imports) against modified .py files
entry: mypy
language: python
files: .*.py$
verbose: true
# Check pdm.lock is up-to-date with pyproject.toml
- repo: https://github.com/pdm-project/pdm
rev: 2.18.1
hooks:
- id: pdm-lock-check
- id: pdm-sync
- repo: local
hooks:
- id: pytest
name: pytest
entry: pdm run tests
language: python
types: [python]
pass_filenames: false
always_run: true