apply precommit

This commit is contained in:
2026-06-18 09:27:42 +08:00
parent 2f2db72db1
commit 945b04bb56
6 changed files with 85 additions and 68 deletions

33
.pre-commit-config.yaml Normal file
View File

@ -0,0 +1,33 @@
default_language_version:
python: python3.13
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
args: ["--maxkb=512"]
- id: check-yaml
- id: check-toml
- id: check-docstring-first
- repo: local
hooks:
- id: ruff-format
name: ruff format
entry: uv run ruff format .
language: system
types: [python]
- id: ruff-check
name: ruff check
entry: uv run ruff check --fix .
language: system
types: [python]
- id: pytest
name: pytest
entry: uv run pytest tests/ -v
language: system
pass_filenames: false
stages: [pre-push]