Investigate ty type checker alongside mypy

Đang mở
#681 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
55/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
python

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Python
Star
1.2k
Fork
127
Merge trung bình
2 giờ 13 phút
Pull request đã merge (30 ngày)
1

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của tmux-python/libtmux

Tất cả issue của tmux-python/libtmux

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.