Skip to content

Unclear Coverage Results #18926

Open
Open
@Lyranile

Description

@Lyranile

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

nedbat/coveragepy#1948

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmypy got something wrongpendingIssues that may be closed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions