Silence beartype/numpy PEP 695 warning noise - #97
Closed
hmgaudecker wants to merge 1 commit into
Closed
Conversation
…bility beartype 0.22.9 (latest) cannot decorate any parameterized numpy.typing.NDArray[...] hint under numpy>=2.5's PEP 695 NDArray[ScalarT] definition (confirmed via minimal repro: even NDArray[np.float64] alone fails). beartype.claw already degrades gracefully -- it warns and leaves the function's args unchecked rather than crashing -- so this only affects test log noise, not correctness. No matching upstream beartype issue found; will be filed separately.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #97 +/- ##
=======================================
Coverage 95.83% 95.83%
=======================================
Files 142 142
Lines 14126 14126
=======================================
Hits 13537 13537
Misses 589 589 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pytestfilterwarningsignore forbeartype.roar.BeartypeClawDecorWarningmessages about numpy dtypes.beartype0.22.9 (latest release) cannot decorate any parameterizednumpy.typing.NDArray[...]hint undernumpy>=2.5's PEP 695NDArray[ScalarT]definition — confirmed with a minimal repro (even a bareNDArray[np.float64]fails).beartype.clawalready degrades gracefully (warns, leaves that function's args unchecked) so this is log noise only, not a correctness issue. No matching upstreambeartypeissue found; will be filed separately. The filter is scoped by message so an unrelated future claw-decoration warning would still surface.(Note: this branch is based on current
main, which already includes thecodecov.ymlproject-target bump to 95% from #96 — that commit landed onmainbefore #96 was merged, so it's not repeated here.)Test plan
pixi run -e tests-cpu pytest tests/test_simulate_data.py -q -rw→ 13 passed, 1 unrelated warning (previously 6 distinctBeartypeClawDecorWarnings)prek run --all-filespasses cleanly🤖 Generated with Claude Code