本文へスキップ
Kitbay
スキル

pyrefly-type-coverage

NOASSERTION2026年11月11日 更新105,390GitHubスター

A contributor skill in the PyTorch repository for moving one Python file to stricter type checking with Pyrefly, where every function, class and attribute must be annotated.

スキルの内容

A contributor skill in the PyTorch repository for moving one Python file to stricter type checking with Pyrefly, where every function, class and attribute must be annotated. The agent removes file-wide suppression comments, adds a sub-configuration for the file's folder to the Pyrefly settings, runs the checker and adds annotations rather than suppressing missing-annotation errors. Errors that come from other files or external symbols are left or suppressed locally with a to-do note. It follows set conventions for modern typing syntax, widens types step by step only when needed and keeps the signatures of functions marked backward compatible. It then runs lintrunner and the related tests, and leaves committing to the user.

できること

  • Enable strict Pyrefly checks for one file
  • Add type annotations instead of suppressions
  • Keep backward-compatible signatures unchanged
  • Run lintrunner and related tests