Skip to content

Conversation

@wlav
Copy link
Contributor

@wlav wlav commented Jan 9, 2026

Improvements to Python test coverage and fixes for issues thus uncovered. This code introduces a helper for annotating the same Python function for different C++ types, which is similar functionality as is being provided by #213, which would benefit from this helper.

try:
config[42] # should raise
assert not "did not raise TypeError"
except TypeError:

Check notice

Code scanning / CodeQL

Empty except Note test

'except' clause does nothing but pass and there is no explanatory comment.
@codecov
Copy link

codecov bot commented Jan 9, 2026

Codecov Report

❌ Patch coverage is 94.44444% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
plugins/python/src/configwrap.cpp 88.88% 0 Missing and 1 partial ⚠️

❌ Your project check has failed because the head coverage (76.93%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage.

@@            Coverage Diff             @@
##             main     #245      +/-   ##
==========================================
+ Coverage   76.25%   76.93%   +0.68%     
==========================================
  Files         124      124              
  Lines        2733     2736       +3     
  Branches      475      475              
==========================================
+ Hits         2084     2105      +21     
+ Misses        452      439      -13     
+ Partials      197      192       -5     
Flag Coverage Δ
unittests 76.93% <94.44%> (+0.68%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
plugins/python/src/errorwrap.cpp 56.81% <ø> (ø)
plugins/python/src/modulewrap.cpp 42.12% <100.00%> (+1.34%) ⬆️
plugins/python/src/pymodule.cpp 64.58% <100.00%> (ø)
plugins/python/src/wrap.hpp 100.00% <ø> (ø)
plugins/python/src/configwrap.cpp 96.15% <88.88%> (+19.53%) ⬆️

... and 4 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7f1168a...b18aa9a. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.


class AddableProtocol[T](Protocol):
"""Typer bound for any types that can be added."""
def __add__(self, other: T) -> T: ... # noqa: D105

Check notice

Code scanning / CodeQL

Statement has no effect Note test

This statement has no effect.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant