-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
53 lines (52 loc) · 1.44 KB
/
.pre-commit-config.yaml
File metadata and controls
53 lines (52 loc) · 1.44 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
51
52
53
default_install_hook_types:
- pre-commit
- pre-push
default_stages:
- pre-commit
fail_fast: true
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-added-large-files
args: ['--maxkb=100']
- id: check-shebang-scripts-are-executable
- id: check-executables-have-shebangs
- id: check-symlinks
- id: mixed-line-ending
args: [--fix=lf]
- repo: local
hooks:
- id: uv-lock
name: uv lock
description: Sync uv lock
entry: uv lock --quiet
language: python
pass_filenames: false
- id: ruff-format
name: ruff format
description: Format with ruff
entry: uv run --frozen -q ruff format
language: system
pass_filenames: false
- id: ruff-check
name: ruff
description: Lint with ruff
entry: uv run --frozen -q ruff check --fix --exit-non-zero-on-fix
language: system
pass_filenames: false
- id: mypy-check
name: mypy
description: Check types with mypy
entry: uv run --frozen -q mypy .
language: system
pass_filenames: false
files: \.py$
- id: py-test
name: pytest
stages: [pre-push]
entry: bash run_tests.sh
language: system
pass_filenames: false