aio-libs / propcache

Fast property caching
Apache License 2.0
11 stars 3 forks source link

Remove no cover lines from under_cached_property.__get__ #48

Closed bdraco closed 1 month ago

bdraco commented 1 month ago

These should already be handled by covdefaults

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 88.24%. Comparing base (bc295fd) to head (2f0cc3d). Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
src/propcache/_helpers_py.py 0.00% 0 Missing and 2 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #48 +/- ## ========================================== - Coverage 88.31% 88.24% -0.07% ========================================== Files 17 17 Lines 693 689 -4 Branches 98 98 ========================================== - Hits 612 608 -4 Misses 63 63 Partials 18 18 ``` | [Flag](https://app.codecov.io/gh/aio-libs/propcache/pull/48/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aio-libs) | Coverage Δ | | |---|---|---| | [CI-GHA](https://app.codecov.io/gh/aio-libs/propcache/pull/48/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aio-libs) | `88.24% <0.00%> (-0.07%)` | :arrow_down: | | [MyPy](https://app.codecov.io/gh/aio-libs/propcache/pull/48/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aio-libs) | `77.84% <0.00%> (-0.14%)` | :arrow_down: | | [OS-Linux](https://app.codecov.io/gh/aio-libs/propcache/pull/48/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aio-libs) | `98.38% <ø> (ø)` | | | [OS-Windows](https://app.codecov.io/gh/aio-libs/propcache/pull/48/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aio-libs) | `93.65% <ø> (ø)` | | | [OS-macOS](https://app.codecov.io/gh/aio-libs/propcache/pull/48/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aio-libs) | `94.17% <ø> (ø)` | | | [Py-3.10.11](https://app.codecov.io/gh/aio-libs/propcache/pull/48/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aio-libs) | `92.88% <ø> (ø)` | | | [Py-3.10.15](https://app.codecov.io/gh/aio-libs/propcache/pull/48/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aio-libs) | `95.46% <ø> (ø)` | | | [Py-3.11.10](https://app.codecov.io/gh/aio-libs/propcache/pull/48/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aio-libs) | `95.46% <ø> (ø)` | | | [Py-3.11.9](https://app.codecov.io/gh/aio-libs/propcache/pull/48/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aio-libs) | `92.88% <ø> (ø)` | | | [Py-3.12.6](https://app.codecov.io/gh/aio-libs/propcache/pull/48/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aio-libs) | `95.46% <ø> (ø)` | | | [Py-3.13.0-rc.3](https://app.codecov.io/gh/aio-libs/propcache/pull/48/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aio-libs) | `95.46% <ø> (ø)` | | | [Py-3.8.10](https://app.codecov.io/gh/aio-libs/propcache/pull/48/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aio-libs) | `93.18% <ø> (ø)` | | | [Py-3.8.18](https://app.codecov.io/gh/aio-libs/propcache/pull/48/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aio-libs) | `95.77% <ø> (ø)` | | | [Py-3.9.13](https://app.codecov.io/gh/aio-libs/propcache/pull/48/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aio-libs) | `92.85% <ø> (ø)` | | | [Py-3.9.20](https://app.codecov.io/gh/aio-libs/propcache/pull/48/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aio-libs) | `95.45% <ø> (ø)` | | | [Py-pypy7.3.11](https://app.codecov.io/gh/aio-libs/propcache/pull/48/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aio-libs) | `95.50% <ø> (ø)` | | | [Py-pypy7.3.16](https://app.codecov.io/gh/aio-libs/propcache/pull/48/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aio-libs) | `95.13% <ø> (ø)` | | | [Py-pypy7.3.17](https://app.codecov.io/gh/aio-libs/propcache/pull/48/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aio-libs) | `95.14% <ø> (ø)` | | | [VM-macos-latest](https://app.codecov.io/gh/aio-libs/propcache/pull/48/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aio-libs) | `94.17% <ø> (ø)` | | | [VM-ubuntu-latest](https://app.codecov.io/gh/aio-libs/propcache/pull/48/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aio-libs) | `98.38% <ø> (ø)` | | | [VM-windows-latest](https://app.codecov.io/gh/aio-libs/propcache/pull/48/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aio-libs) | `93.65% <ø> (ø)` | | | [pytest](https://app.codecov.io/gh/aio-libs/propcache/pull/48/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aio-libs) | `98.38% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aio-libs#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

bdraco commented 1 month ago

I think Covdefaults only handles ellipsis on a separate line. Otherwise, it'd exclude too much.

I tried that but pre-commit moved them back

bdraco commented 1 month ago

... and it just did here as well

webknjaz commented 1 month ago

It looks like this should also cover the same line: https://pypi.org/project/covdefaults/

bdraco commented 1 month ago

Didn't fail, but still shows as partial on https://app.codecov.io/gh/aio-libs/propcache/pull/48/blob/src/propcache/_helpers_py.py

webknjaz commented 1 month ago

@bdraco that's not a pytest+coveragepy partial, though: https://app.codecov.io/gh/aio-libs/propcache/pull/48/blob/src/propcache/_helpers_py.py?flags%5B0%5D=pytest#L54. You can see it with only the pytest flag set. It's coming from MyPy: https://app.codecov.io/gh/aio-libs/propcache/pull/48/blob/src/propcache/_helpers_py.py?flags%5B0%5D=MyPy.

To see MyPy coverage locally, do python3 -Im webbrowser $(ls -1 .tox/.tmp/.mypy/python-3.*/index.html | head -n 1) after running pre-commit.

bdraco commented 1 month ago

I get it, but the combined view is a bit misleading because it looks like there is a problem but there isn't. I'm not sure there is anything to do about it though.

webknjaz commented 1 month ago

yeah, this probably needs research