Skip to content
New issue

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

Issue with Python Elipisis (...) in coverage. #10

Closed
mardiros opened this issue Jan 8, 2022 · 4 comments
Closed

Issue with Python Elipisis (...) in coverage. #10

mardiros opened this issue Jan 8, 2022 · 4 comments

Comments

@mardiros
Copy link

mardiros commented Jan 8, 2022

Acually, in python we user ... to define Protocol class.

See https://www.python.org/dev/peps/pep-0544/

But actually, a protocol is a signature, so it is not testable, so it should be ignorable by the coverage.

I've added this line in my coverage file

[tool.coverage.report]
exclude_lines = [
"...",
]

which works perfectly with the python pluging.

But it makes the coverage on covecov crashing or somethins like this.

As a result, the coverage has been wrong for a long time because codecov is keeping the
previous known state of coverage.

This should make the coverage in a crashed or 0, not 100% !

As you can see in my project here / https://app.codecov.io/gh/mardiros/blacksmith/ fixed at the time.

@mardiros
Copy link
Author

mardiros commented Jan 8, 2022

nedbat/coveragepy#1042

Ok I got this, but you should do something about that.

@thomasrockhu-codecov
Copy link
Contributor

hi @mardiros, I'm a little late to the game here. I saw this comment, and not sure if it fixes your use case or not. I saw that you removed all the ... lines from your codebase.

As far as what we can do, I'm not sure this is something Codecov can help. We ingest the coverage reports that are given to us, and I took a look, and all the reports previously had no coverage.

@covecod covecod bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 Aug 4, 2023
@covecod covecod bot moved this from Waiting for: Product Owner to Waiting for: Community in GitHub Issues with 👀 Aug 4, 2023
@mardiros
Copy link
Author

mardiros commented Aug 4, 2023

Thanks for answering @thomasrockhu-codecov

To complete my comment, my setup was OK, and, codecov give me a feedback in comments,
and, when I add those ... in my coverage ignore, it just stop saying me its bad.

image

The previous MR is here:
mardiros/blacksmith#5

The MR that introduce the ...
mardiros/blacksmith#6

I thought that it can detected that there is a problem that could be reported comment. (Better than stop commenting?)

By the way, since I know where that the issue comme from, I fix it and reuse the ellipsis everywhere,
and it works like a charm.

@covecod covecod bot moved this from Waiting for: Community to Waiting for: Product Owner in GitHub Issues with 👀 Aug 4, 2023
@thomasrockhu-codecov
Copy link
Contributor

Ok, if you're comfortable with it @mardiros I'm going to close out this issue. I don't think it would be possible for Codecov to really give feedback since we might not know the reason behind not getting coverage reports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Waiting for: Product Owner
Development

No branches or pull requests

3 participants
@mardiros @thomasrockhu-codecov and others