Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions .pre-commit-config.yaml

This file was deleted.

12 changes: 5 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ help:

.DEFAULT_GOAL := help

.PHONY: prek-install
prek-install:
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/download/v0.3.5/prek-installer.sh | sh

.PHONY: fmt
fmt:
uv run python -m ruff format
Expand All @@ -20,13 +24,7 @@ mypy:

.PHONY: uvlock
uvlock:
uv lock
for dir in plugins/*/; do \
if [ -f "$$dir/uv.lock" ]; then \
echo "Checking $$dir..."; \
uv lock --directory "$$dir"; \
fi \
done
bash maint_tools/uvlock.sh

.PHONY: lint
lint-fix:
Expand Down
10 changes: 10 additions & 0 deletions maint_tools/uvlock.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
set -euo pipefail

uv lock
for dir in plugins/*/; do
if [ -f "$dir/uv.lock" ]; then
echo "Checking $dir..."
uv lock --directory "$dir"
fi
done
26 changes: 26 additions & 0 deletions prek.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[[repos]]
repo = "local"

[[repos.hooks]]
id = "fmt"
name = "make fmt"
language = "system"
entry = "make fmt"
pass_filenames = false
files = "\\.py$"

[[repos.hooks]]
id = "mypy"
name = "make mypy"
language = "system"
entry = "make mypy"
pass_filenames = false
files = "\\.py$"

[[repos.hooks]]
id = "uvlock"
name = "make uvlock"
language = "system"
entry = "make uvlock"
pass_filenames = false
files = "(^|/)pyproject\\.toml$|(^|/)uv\\.lock$"
Loading