// readme

ty-pre-commit

A pre-commit hook for running ty quickly over your whole Python project.

When ty is invoked by this hook, dependencies declared in your project’s pyproject.toml will automatically be resolvable by ty. This means your project configuration remains the single source of truth: you do not need to duplicate type-checking dependencies in the hook’s additional_dependencies setting. Any additional dependencies listed in the hook’s additional_dependencies setting will not be resolvable by ty.

Under the hood, the hook runs uv’s preview uv check command. Each hook revision pins both the corresponding ty version and the latest uv version that was available when that ty version was released. New ty releases trigger ty-pre-commit releases; new uv releases do not trigger releases on their own. The full uv command invoked by the hook can be found in .pre-commit-hooks.yaml.

Configure ty in your project’s pyproject.toml or ty.toml: see…