forked from ChelseaKR/ca-tariff-parse
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
45 lines (41 loc) · 1.31 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
45 lines (41 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
# Runs the fast half of `make verify` before a commit is written.
# Install once with: uv run pre-commit install
default_language_version:
python: python3.12
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-added-large-files
args: ["--maxkb=512"]
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: mixed-line-ending
args: ["--fix=lf"]
- id: trailing-whitespace
# Fixture column alignment is load-bearing: the parser reads it as
# table geometry, so trailing space there is content, not whitespace.
exclude: ^tests/fixtures/
# Keep this rev in step with the ruff floor in pyproject.toml and the
# version uv.lock resolves. A hook older than CI's ruff will format code
# one way locally and fail `ruff format --check` in CI.
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.16.3
hooks:
- id: ruff-check
args: ["--fix"]
- id: ruff-format
- repo: https://github.com/gitleaks/gitleaks
rev: v8.30.0
hooks:
- id: gitleaks
- repo: local
hooks:
- id: mypy
name: mypy (strict)
entry: uv run mypy
language: system
pass_filenames: false
types: [python]