Skip to content

Automatically ignore lines containing just an ellipsis #1476

@nickeldan

Description

@nickeldan

It is common practice, when defining a typing.Protocol, to put in an ellipsis as a method stub:

class Proto(typing.Protocol):
    def func(self) -> int:
        ...

Since the stubs are never actually called, I have to manually put # pragma: no cover after each ellipsis.

Would it make sense for coverage to automatically not cover a line that is just an ellipsis?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestwontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions