Skip to content

Silence beartype/numpy PEP 695 warning noise - #97

Closed
hmgaudecker wants to merge 1 commit into
mainfrom
codecov-and-warnings
Closed

Silence beartype/numpy PEP 695 warning noise#97
hmgaudecker wants to merge 1 commit into
mainfrom
codecov-and-warnings

Conversation

@hmgaudecker

Copy link
Copy Markdown
Member

Summary

  • Adds a scoped pytest filterwarnings ignore for beartype.roar.BeartypeClawDecorWarning messages about numpy dtypes. beartype 0.22.9 (latest release) cannot decorate any parameterized numpy.typing.NDArray[...] hint under numpy>=2.5's PEP 695 NDArray[ScalarT] definition — confirmed with a minimal repro (even a bare NDArray[np.float64] fails). beartype.claw already degrades gracefully (warns, leaves that function's args unchecked) so this is log noise only, not a correctness issue. No matching upstream beartype issue 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 the codecov.yml project-target bump to 95% from #96 — that commit landed on main before #96 was merged, so it's not repeated here.)

Test plan

  • Confirmed the warning disappears: pixi run -e tests-cpu pytest tests/test_simulate_data.py -q -rw → 13 passed, 1 unrelated warning (previously 6 distinct BeartypeClawDecorWarnings)
  • prek run --all-files passes cleanly

🤖 Generated with Claude Code

…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.
@hmgaudecker
hmgaudecker deleted the codecov-and-warnings branch July 29, 2026 11:34
@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.83%. Comparing base (c6e47c5) to head (28ce64b).

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.
📢 Have feedback on the report? Share it here.

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

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