Python Type Hint Coverage Checker
Reports annotation coverage per function and names the parameters and returns that have none.
Loading the tool…
How to use this tool
- Paste the module, or load a .py file with the picker.
- Select Check the coverage.
- Work down the "unannotated parameters" column — each name in it is one annotation away from being done.
- Run it again after your changes; the percentage in the summary is the progress.
What python type hint coverage does
Adding type hints to an existing codebase is a long job done one module at a time, and the hard part is knowing where you are. This page reads a module and reports, function by function, which parameters carry an annotation, whether the return type is declared, and what the coverage adds up to. Run it before you start and again afterwards and the difference is the work you did.
The counting rules are the ones a reviewer would use. self and cls are ignored, because annotating them is not the convention and including them would understate every method. Positional-only and keyword-only markers are not parameters and are not counted. A default value containing a colon — a dict literal, say — does not count as an annotation, which is the case a naive check gets wrong. Nothing is executed and no imports are resolved: this reports whether an annotation is present, not whether it is correct, which is the job of a type checker run against the whole project.