-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
46 lines (42 loc) · 1.03 KB
/
.pre-commit-config.yaml
File metadata and controls
46 lines (42 loc) · 1.03 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
# Quick Start:
#
# uv pip install pre-commit
# pre-commit install && pre-commit install -t pre-push
# pre-commit run --all-files
#
# To Skip Checks:
#
# git commit --no-verify
fail_fast: false
default_language_version:
python: python3.12
repos:
# Git & File Hygiene
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-docstring-first
- id: check-merge-conflict
- id: check-symlinks
- id: check-yaml
- id: check-json
- id: end-of-file-fixer
- id: trailing-whitespace
- id: no-commit-to-branch
args: [--branch, main]
# Ruff Linter and Formatter
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.7
hooks:
# Run the linter with auto-fix.
- id: ruff
args: [--fix, --select, "I"] # I - isort
# Run the formatter.
- id: ruff-format
# Typos
- repo: https://github.com/crate-ci/typos
rev: v1.44.0
hooks:
- id: typos