docs/internal/ty-baseline.md
ty runs in CI as an informational check to evaluate its usefulness vs mypy. If you see ty annotations in your PR:
The baseline system filters out 567 pre-existing errors so you only see new issues introduced by your changes.
./bin/ty.py check path/to/file.py # Check specific files
./bin/ty.py check posthog ee # Check directories
ty is currently in trial mode:
mypy remains the authoritative type checker:
This trial helps us evaluate whether ty should become a blocking check in the future.
mypy-baseline.txt - Maintained by mypy (~1287 errors)ty-baseline.txt - Maintained by ty (567 diagnostics)ty maintains its own baseline because it reports different errors than mypy. The baseline contains pre-existing errors that won't trigger warnings in CI.
The ty-baseline.txt contains:
About 50% are real bugs, 25% safety improvements, 25% trivial cleanups.
When you fix ty errors across the codebase, update the baseline:
./bin/ty.py sync
git add ty-baseline.txt
git commit -m "chore: update ty baseline after fixing type errors"
The sync command runs ty on all Python directories and updates ty-baseline.txt with the current state.
ty-baseline.txt