chore: [pre-commit.ci] pre-commit autoupdate#2264
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #2264 +/- ##
==========================================
- Coverage 98.30% 98.27% -0.03%
==========================================
Files 69 69
Lines 4534 4534
Branches 802 801 -1
==========================================
- Hits 4457 4456 -1
Misses 45 45
- Partials 32 33 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
updates: - [github.com/astral-sh/ruff-pre-commit: v0.0.276 → v0.0.281](astral-sh/ruff-pre-commit@v0.0.276...v0.0.281) - [github.com/psf/black: 23.3.0 → 23.7.0](psf/black@23.3.0...23.7.0) - [github.com/asottile/blacken-docs: 1.14.0 → 1.15.0](adamchainz/blacken-docs@1.14.0...1.15.0)
for more information, see https://pre-commit.ci
a2d44b4 to
b8faaa6
Compare
There was a problem hiding this comment.
It is unclear to me why coverage is reporting the [0] case as being fully covered but the next case as only partial coverage. :?
There was a problem hiding this comment.
Ah. Seems because help(next) shows
Help on built-in function next in module builtins:
next(...)
next(iterator[, default])
Return the next item from the iterator. If default is given and the iterator
is exhausted, it is returned instead of raising StopIteration.
that coveragepy/coveragepy#605 (comment) and coveragepy/coveragepy#1617 might be relevant here.
There was a problem hiding this comment.
@kratsg Is there a way to mock or do something else to get
pyhf/tests/contrib/test_viz.py
Lines 16 to 23 in 6c35247
to cause
pyhf/src/pyhf/contrib/viz/brazil.py
Lines 360 to 366 in 6c35247
to raise a StopIteration when switched to using next? So to mock the value of labels such that one of the label_part values aren't found?
By construction the function should always get the values, so this might be an area where the dip in the test coverage by partial for 1 line is worth it.
There was a problem hiding this comment.
Yeah, this can just be mocked and so can just be a follow up PR.
updates: