Skip to content
Kitbay
Submit
Skill

pyrefly-type-coverage

NOASSERTIONUpdated on Nov 11, 2026105,390GitHub stars

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.

What the skill teaches

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.

Capabilities

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