-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
57 lines (53 loc) · 1.7 KB
/
.pre-commit-config.yaml
File metadata and controls
57 lines (53 loc) · 1.7 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
54
55
56
57
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-merge-conflict
- id: check-toml # For pyproject.toml
- id: check-yaml # For workflows
# Only parse the files for syntax, don't do full load.
# We need this because of mkdocs.yml, which uses some custom tags to perform dynamic imports from python.
args: ["--unsafe"]
- id: end-of-file-fixer
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: mixed-line-ending
args: [--fix=lf]
- id: sort-simple-yaml
- repo: local
hooks:
- id: ruff-linter
name: Ruff Linter
description: Run ruff checks on the code
entry: ruff check --force-exclude
language: system
types: [python]
require_serial: true
args: [--fix, --exit-non-zero-on-fix]
- repo: local
hooks:
- id: ruff-formatter
name: Ruff Formatter
description: Ruf ruff auto-formatter
entry: ruff format
language: system
types: [python]
require_serial: true
- repo: local
hooks:
- id: basedpyright
name: Based Pyright
description: Run basedpyright type checker
entry: basedpyright --warnings
language: system
types: [python]
pass_filenames: false # pyright runs for the entire project, it can't run for single files
- repo: local
hooks:
- id: uv-lockfile
name: UV Lockfile
description: Check if the UV lockfile is up to date with pyproject.toml
entry: uv lock --check
language: system
files: '^pyproject\.toml$|^uv\.lock$'
pass_filenames: false