build: switch to uv, hatchling and ruff-only tooling
This commit is contained in:
1 parent
8b7bb7205c
commit
c0b22c531e
9 files changed
+2385
-287
No files matched your search
+5
-22
@@ -1,42 +1,25 @@
|
||||
# Pre-commit hooks mirror `make lint` so local commits enforce the same checks as CI.
|
||||
# Installed via `make install-dev` (runs `pre-commit install`).
|
||||
#
|
||||
# Hooks use `language: system`, i.e. they invoke ruff/black/mypy from PATH rather than
|
||||
# letting pre-commit manage isolated tool environments. This keeps versions identical to
|
||||
# `make lint`/`make format` and lets mypy resolve the project's real dependencies.
|
||||
# Requirement: commit with the dev virtualenv active (so requirements-dev.txt tools are on
|
||||
# PATH). Outside an active venv the hooks will report the tools as "not found".
|
||||
# Hooks mirror `make lint`. Install with: uv run pre-commit install (add pre-commit
|
||||
# yourself, it is not a project dependency) or run the same commands via `make lint`.
|
||||
repos:
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: ruff-check
|
||||
name: ruff check
|
||||
entry: ruff check
|
||||
entry: uv run ruff check
|
||||
language: system
|
||||
types: [python]
|
||||
args: [src/, tests/]
|
||||
pass_filenames: false
|
||||
|
||||
- id: ruff-format
|
||||
name: ruff format --check
|
||||
entry: ruff format --check
|
||||
entry: uv run ruff format --check
|
||||
language: system
|
||||
types: [python]
|
||||
args: [src/, tests/]
|
||||
pass_filenames: false
|
||||
|
||||
- id: black
|
||||
name: black --check
|
||||
entry: black --check
|
||||
language: system
|
||||
types: [python]
|
||||
args: [src/, tests/]
|
||||
pass_filenames: false
|
||||
|
||||
- id: mypy
|
||||
name: mypy
|
||||
entry: mypy
|
||||
entry: uv run mypy src
|
||||
language: system
|
||||
types: [python]
|
||||
args: [src/]
|
||||
pass_filenames: false
|
||||
Reference in new issue
Block a user