We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It is common practice, when defining a typing.Protocol, to put in an ellipsis as a method stub:
typing.Protocol
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.
# pragma: no cover
Would it make sense for coverage to automatically not cover a line that is just an ellipsis?
The text was updated successfully, but these errors were encountered:
You don't have to add a comment to each line. You can add to your exclude_lines setting:
[report] exclude_lines: ^\s+\.\.\.
Keep in mind that you have to also add the default settings here as well, since your setting will override the defaults.
Sorry, something went wrong.
.coveragerc
exclude_also
No branches or pull requests
It is common practice, when defining a
typing.Protocol
, to put in an ellipsis as a method stub: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?
The text was updated successfully, but these errors were encountered: