Question Details

No question body available.

Tags

python pre-commit astral-ty

Answers (1)

Accepted Answer Available
Accepted Answer
January 22, 2026 Score: 0 Rep: 309 Quality: Medium Completeness: 40%

You could try this command that telling Ty to test only the files which are tracked in git:

git ls-files -- '.py' '.ipynb' | xargs -d '\n' ty check

Any untracked file will be vanished from git ls-files.

For pre-commit you can do:

entry: bash -c "git ls-files -- '.py' '.ipynb' | xargs -d '\n' uv run ty check"