tmux-python / tmux-python/libtmux

Investigate ty type checker alongside mypy

Open
#681 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.2k
Forks
127
Avg merge
2h 13m
Merged PRs (30d)
1

Description

Summary

ty is Astral's Rust-based Python type checker (beta). It's 10-100x faster than mypy, checks unannotated function bodies by default, and supports advanced features like intersection types and reachability analysis.

libtmux is well-positioned for ty adoption:

  • No mypy plugins in use (ty's biggest gap — no plugin system)
  • Only 9 type: ignore comments across the codebase
  • Already uses Astral's ruff and uv tooling
  • Strict mypy configuration with full type annotations

Goals

  1. Add ty as a dev dependency alongside mypy (not replacing it)
  2. Add ty configuration in pyproject.toml and justfile targets
  3. Add ty to CI as a non-blocking step
  4. Compare diagnostics: what ty catches vs mypy, false positives, speed
  5. Determine if ty can eventually displace mypy

Approach

  • Gradual adoption: run both checkers in parallel
  • Start with known-noisy rules suppressed, re-enable incrementally
  • CI runs ty with continue-on-error: true so it doesn't block builds
  • Document findings in the PR for future reference

References

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing pyproject.toml, the justfile, and the repository's CI configuration, then read the ty documentation and run ty alongside mypy. Add the development dependency, configuration, targets, and non-blocking CI step described in the issue. Done means both checkers run, diagnostics and speed differences are documented, and the CI step does not block builds.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ci-cd, developer-experience, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.