-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
71 lines (64 loc) · 1.89 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
71 lines (64 loc) · 1.89 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
# Local hooks that use uv
- repo: local
hooks:
# Ruff linter and formatter via uv
- id: ruff-lint
name: ruff (lint)
entry: uv run ruff check
language: system
types: [python]
args: [--fix, src/]
pass_filenames: false
require_serial: true
- id: ruff-format
name: ruff (format check)
entry: uv run ruff format --check
language: system
types: [python]
args: [src/]
pass_filenames: false
require_serial: true
# MyPy via uv
- id: mypy
name: mypy (type check)
entry: uv run mypy
language: system
types: [python]
pass_filenames: false
args: [src/pararam_nexus_mcp, --ignore-missing-imports]
require_serial: true
# General hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
name: Trim trailing whitespace
- id: end-of-file-fixer
name: Fix end of files
- id: check-yaml
name: Check YAML syntax
- id: check-added-large-files
args: [--maxkb=500]
name: Check for large files (>500KB)
- id: check-merge-conflict
name: Check for merge conflicts
- id: check-toml
name: Check TOML syntax
- id: debug-statements
name: Check for debugger imports
- id: mixed-line-ending
args: [--fix=lf]
name: Fix mixed line endings
# Configuration
default_language_version:
python: python3.14
# Run on all files by default
files: ''
exclude: '^(\.git|\.venv|venv|build|dist|\.egg|\.pytest_cache|__pycache__|htmlcov|\.coverage|\.mypy_cache|\.ruff_cache)/'
# Fail fast on first error
fail_fast: false
# Default stages
default_stages: [pre-commit]