mirror of
https://github.com/basnijholt/compose-farm.git
synced 2026-02-03 14:13:26 +00:00
feat: add ty type checker alongside mypy (#77)
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
This commit is contained in:
@@ -25,13 +25,18 @@ repos:
|
||||
args: [--fix]
|
||||
- id: ruff-format
|
||||
|
||||
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||
rev: v1.14.0
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: mypy
|
||||
exclude: ^docs/demos/
|
||||
additional_dependencies:
|
||||
- pydantic>=2.0.0
|
||||
- typer>=0.9.0
|
||||
- asyncssh>=2.14.0
|
||||
- types-PyYAML
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user