-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
48 lines (45 loc) · 1.79 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
48 lines (45 loc) · 1.79 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
repos:
# ---------------------------------------------------------------------------
# File hygiene - catches trivial issues before CI sees them
# ---------------------------------------------------------------------------
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml # validates prefect.yaml, ci.yml, this file
exclude: ^mkdocs\.yml$
- id: check-toml # validates pyproject.toml
- id: check-merge-conflict
- id: debug-statements # catches breakpoint() / import pdb left in
- id: check-added-large-files
args: [--maxkb=500] # guard against accidentally staging a CSV
# ---------------------------------------------------------------------------
# Ruff - lint + format
# ---------------------------------------------------------------------------
- repo: local
hooks:
- id: ruff-check
name: ruff check
entry: uv run ruff check --fix --unsafe-fixes src/ tests/
language: system
pass_filenames: false
- id: ruff-format
name: ruff format
entry: uv run ruff format src/ tests/
language: system
pass_filenames: false
# ---------------------------------------------------------------------------
# Mypy - type check (mirrors CI: mypy src/)
# ---------------------------------------------------------------------------
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.15.0
hooks:
- id: mypy
args: [src/]
additional_dependencies:
- "sqlalchemy[mypy]>=2.0,<3.0"
- "types-requests>=2.31"
- "pydantic-settings>=2.0,<3.0"
- "prefect>=3.0,<4.0"
pass_filenames: false