-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
28 lines (26 loc) · 967 Bytes
/
.pre-commit-config.yaml
File metadata and controls
28 lines (26 loc) · 967 Bytes
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
# .pre-commit-config.yaml
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0 # Use the latest stable version
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: no-commit-to-branch
- id: check-added-large-files
- repo: https://github.com/astral-sh/ruff-pre-commit
# Use the latest Ruff release (e.g., v0.12.2 or newer)
# Check https://github.com/astral-sh/ruff-pre-commit/releases for the latest version
rev: v0.14.2
hooks:
- id: ruff-format # Runs Ruff's formatter
- id: ruff-check # Runs Ruff's linter
args: [ --fix ]
- repo: local # Local hook for 'ty' as it doesn't have an official pre-commit hook yet
hooks:
- id: ty-check
name: ty check
entry: uv run ty check . # Assumes 'ty' is installed via uv and 'uv run' is used
language: system
types: [ python ]
pass_filenames: false