mfisherlevine/mypy-coverage
Report mypy annotation coverage. Add inline annotations and gate CI on a coverage threshold.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| version | mypy-coverage version on PyPI. Use 'latest' or pin like '0.2.4'. | no | latest |
| python-version | Python version to install. | no | 3.11 |
| paths | Space-separated paths to scan. Defaults to the ``files`` and ``mypy_path`` settings in the discovered mypy config. | no | "" |
| config | Path to mypy config file. Auto-detected if empty. | no | "" |
| root | Project root. Defaults to the config's directory or CWD. | no | "" |
| threshold | Fail the step if coverage falls below this percentage (0-100). Leave empty to disable the gate. | no | "" |
| threshold-metric | Which metric --threshold applies to: 'checked' or 'fully-typed'. | no | checked |
| format | Output format for the user-facing run: text, json, markdown, or github. | no | github |
| sort | Sort the per-file table by 'path' (alphabetical) or 'coverage' (worst first). | no | path |
| silent-any | Set to 'true' to also flag patterns that decay to Any. | no | false |
| include-excluded | Include the walled-off excluded-files section ('true' or 'false'). | no | true |
| list | Set to 'true' to list every unannotated definition by name. | no | false |
| list-partial | Set to 'true' to list every partially annotated definition by name. | no | false |
Outputs
| name | description |
|---|---|
| percent-checked | Fraction of definitions whose body mypy actually analyses, as a percentage. |
| percent-fully-typed | Fraction of definitions with complete annotations, as a percentage. |
| unannotated | Count of unannotated definitions in the main body. |
| partial | Count of partially-annotated definitions in the main body. |
| total | Total definitions in the main body (excludes mypy-excluded files). |