Warning
Work in progress: This project is still under active development. You may hit bugs or unexpected behavior.
rety runs mypy, Pyright, Pyrefly, and ty on the same Python code, normalizes their diagnostics, and shows where they agree, where they disagree, and why.
$ rety check src/
src/api.py ────────────────────────────────────────────────
3/4 * HIGH L42 in handle_request [Call]
mypy error 42:18 Argument 1 to "process" has incompatible type "str"; expected "int" [arg-type]
pyright error 42:18 Argument of type "str" cannot be assigned to parameter "x" of type "int" [reportArgumentType]
pyrefly error 42:18 Expected `int`, got `str` [bad-argument-type]
pipx install rety
# or
uv tool install retyTip
rety doesn't bundle the checkers. Run pip install mypy pyright pyrefly ty to get all four.
rety check src/ # run all available checkers
rety check --checker mypy,pyright src/ # run specific checkers
rety check --format json src/ # machine-readable output
rety check --verbose src/ # show why diagnostics were grouped
rety check --fail-on error src/ # exit 1 on errors (for CI)
rety check --python .venv/bin/python src/ # make every checker use your project's environmentExit codes: 0 done, 1 --fail-on threshold met, 2 usage error or no checker available, 3 a checker crashed, timed out or rejected its config (the report is incomplete).
from rety import ALL_ADAPTERS, run_checkers
from rety.align import align
adapters = [ALL_ADAPTERS[name]() for name in ("mypy", "pyright")]
results = run_checkers(adapters, paths=["src"], cwd="/path/to/project")
diagnostics = [d for r in results if r.succeeded for d in r.diagnostics]
for cluster in align(diagnostics, root="/path/to/project"):
print(cluster.checkers_present, cluster.confidence, cluster.file)uv sync --all-groups
uv run pytest -q
uv run mypy src
uv run ruff check src tests