mirror of
https://github.com/basnijholt/compose-farm.git
synced 2026-03-06 10:52:03 +00:00
Add Astral's ty type checker (written in Rust, 10-100x faster than mypy) as a second type checking layer. Both run in pre-commit and CI. Fixed type issues caught by ty: - config.py: explicit Host constructor to avoid dict unpacking issues - executor.py: wrap subprocess.run in closure for asyncio.to_thread - api.py: use getattr for Jinja TemplateModule macro access - test files: fix playwright driver_path tuple handling, pytest rootpath typing
43 lines
1.0 KiB
YAML
43 lines
1.0 KiB
YAML
repos:
|
|
- repo: local
|
|
hooks:
|
|
- id: check-readme-commands
|
|
name: Check README documents all CLI commands
|
|
entry: uv run python .github/check_readme_commands.py
|
|
language: system
|
|
files: ^(README\.md|src/compose_farm/cli/.*)$
|
|
pass_filenames: false
|
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v5.0.0
|
|
hooks:
|
|
- id: trailing-whitespace
|
|
- id: end-of-file-fixer
|
|
- id: check-yaml
|
|
- id: check-added-large-files
|
|
- id: check-merge-conflict
|
|
- id: debug-statements
|
|
|
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
rev: v0.14.9
|
|
hooks:
|
|
- id: ruff
|
|
args: [--fix]
|
|
- id: ruff-format
|
|
|
|
- repo: local
|
|
hooks:
|
|
- id: mypy
|
|
name: mypy (type checker)
|
|
entry: uv run mypy src tests
|
|
language: system
|
|
types: [python]
|
|
pass_filenames: false
|
|
|
|
- id: ty
|
|
name: ty (type checker)
|
|
entry: uv run ty check
|
|
language: system
|
|
types: [python]
|
|
pass_filenames: false
|