Unclear Coverage Results
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 20.6k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
Describe the bug
Coverage report with mypy is not clear and not descriptive
To Reproduce
When using mypy report or coverage on pytest the result I'm seeing is not clear
Missing 1-6 4-7 8-7 main.py
This result only shows me the lines with the problem but not what is the problem
The closest I've gotten to seeing the full issue is when using the --report in mypy or other libraries and using html
Mypy src --html-report test
When inspecting the elements I can see issues like any type not recognized or unannotated type set, but the line is usually not correct as it might be related to the definition of the var
var: Var = some_untyped_function()
var.element <---- line that failes
What can I do to make the error clearer, see exactly what failed and how to fix it if possible
Also for reference I opened the same issue in the pycoverage repository and they're saying it might be a mypy thing
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported output with mypy and the coverage report on the example involving main.py, then compare it with the --html-report output. Determine whether the diagnostic points to the actual source of the untyped or unannotated value; done should mean the report clearly identifies the failing type and relevant location.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100