[FIX] Apply Ruff fix to rtest files. - #1301
Conversation
Pyright Type CompletenessView the full Project (full
Other symbols referenced but not exported by
Symbols without documentation:
Patch (exported symbols added or changed by this PR): 0.0% fully typed (0 / 1)
Patch symbol details
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## gd_ruff_fix_user_guide #1301 +/- ##
=========================================================
Coverage ? 91.69%
=========================================================
Files ? 93
Lines ? 5429
Branches ? 704
=========================================================
Hits ? 4978
Misses ? 326
Partials ? 125
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| xp = p.ldf_.get_array_module() | ||
| arr = xp.array(df[0]) | ||
| assert xp.allclose(arr, p.munich_full_triangle_[1, 0, 0, :, :], atol=1e-5) No newline at end of file | ||
| assert xp.allclose(arr, p.munich_full_triangle_[1, 0, 0, :, :], atol=1e-5) |
There was a problem hiding this comment.
ldf_ is always np. sp.allclose also doesn't exist.
| xp = p.get_array_module() | ||
| p_no_tail = mack_p_no_tail(data, averages[0], est_sigma[0]).sigma_.values | ||
| xp.testing.assert_array_equal(p_no_tail, p.values[:, :, :, :-1]) No newline at end of file | ||
| xp.testing.assert_array_equal(p_no_tail, p.values[:, :, :, :-1]) |
There was a problem hiding this comment.
ldf_ is always np. sp.testing.assert_array_equal also doesn't exist.
Summary of Changes
Stacked PR on top of #1290. Added a missing function
dev_corr_p- it was referenced later in the code but never defined.Related GitHub Issue(s)
#1216
Additional Context for Reviewers
Checklist
uv run pytest) and documentation changes (uv run --directory docs jb build . --builder=custom --custom-builder=doctest)Note
Low Risk
Test-only lint and a small missing helper in inactive
@pytest.mark.rtests; no production library behavior changes.Overview
Brings the optional R vs Python
rtest_*.pymodules in line with Ruff so their per-file ignores can be dropped frompyproject.toml.Across those files, bare
except:becomesexcept ImportError:, block-comment headers use single#instead of###, unused imports are removed, and minor formatting/EOF fixes are applied. Inrtest_correlation.py, adds the missingdev_corr_phelper (Python-sidedevelopment_correlation) that downstream correlation tests already called but never defined.Reviewed by Cursor Bugbot for commit 3edb51d. Bugbot is set up for automated code reviews on this repo. Configure here.