How to enforce annotation coverage on a Python library with Pyrefly

· Python Developer Tooling Handbook – pydevtools.com · Aug. 22, 2026, 1:09 p.m.
Summary
This blog post discusses how to enforce annotation coverage in Python libraries using the Pyrefly tool. It explains that annotation coverage measures the fraction of a library's public API that includes type annotations, distinguishing it from type checking. The article highlights the importance of tracking annotation completeness in continuous integration (CI) processes using Pyrefly's coverage subcommand.