-
-
Notifications
You must be signed in to change notification settings - Fork 105
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
50 lines (49 loc) · 1.31 KB
/
.pre-commit-config.yaml
File metadata and controls
50 lines (49 loc) · 1.31 KB
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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
exclude: docs/auto_examples
- id: trailing-whitespace
exclude: docs/auto_examples
- repo: https://github.com/charliermarsh/ruff-pre-commit
# Ruff version.
rev: v0.15.0
hooks:
# Run the linter.
- id: ruff
args: [ --fix ]
# Run the formatter.
- id: ruff-format
- repo: local
hooks:
- id: mypy
name: Mypy
entry: uv run mypy --namespace-packages --explicit-package-bases statemachine/ tests/
types: [python]
language: system
pass_filenames: false
- id: pyright
name: Pyright
entry: uv run pyright statemachine/
types: [python]
language: system
pass_filenames: false
- id: generate-images
name: Generate README images
entry: >-
uv run python -m statemachine.contrib.diagram
tests.examples.traffic_light_machine.TrafficLightMachine
docs/images/readme_trafficlightmachine.png
language: system
pass_filenames: false
files: >-
(statemachine/contrib/diagram/
|tests/examples/traffic_light_machine\.py)
- id: pytest
name: Pytest
entry: uv run pytest -n auto --cov-fail-under=100
types: [python]
language: system
pass_filenames: false