forked from Carreau/undefined
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
81 lines (73 loc) · 2.23 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# See https://pre-commit.com for more information
default_language_version:
python: python3.9
default_install_hook_types: [pre-commit, post-checkout, post-merge]
repos:
- repo: local
hooks:
- id: trailing-whitespace
description: trims trailing whitespace.
entry: uv run trailing-whitespace-fixer
language: system
name: trim trailing whitespace
pass_filenames: true
stages: [commit, manual]
exclude_types: [python, pyi]
types: [text]
- id: end-of-file-fixer
description: ensures that a file is either empty, or ends with one newline.
entry: uv run end-of-file-fixer
language: system
name: fix end of files
pass_filenames: true
stages: [commit, manual]
exclude_types: [python, pyi]
types: [text]
- id: uv-check
name: uv check
description: run uv lock to validate config
entry: uv run uv lock --locked
language: system
pass_filenames: false
files: ^(.*/)?pyproject\.toml|(.*/)?uv\.lock$
stages: [commit]
- id: uv-sync
name: uv sync
description: run uv sync to install dependencies from the lock file
entry: uv run uv sync
language: system
pass_filenames: false
stages: [post-checkout, post-merge]
always_run: true
- id: ruff-check
entry: uv run ruff check --fix --show-fixes
language: system
name: ruff check
pass_filenames: true
require_serial: true
types_or: [python, pyi]
stages: [commit]
- id: ruff-format
entry: uv run ruff format
language: system
name: ruff format
pass_filenames: true
require_serial: true
types_or: [python, pyi]
stages: [commit]
- id: pytest
entry: uv run pytest .
language: system
name: pytest
pass_filenames: false
require_serial: true
types_or: [python, pyi]
stages: [commit]
- id: pyright
entry: uv run pyright .
language: system
name: pyright
pass_filenames: false
require_serial: true
types_or: [python, pyi]
stages: [commit]