Skip to content

Ruff rip - #1364

Draft
genedan wants to merge 2 commits into
mainfrom
ruff_rip
Draft

genedan wants to merge 2 commits into
mainfrom
ruff_rip

Conversation

@genedan

@genedan genedan commented Sep 15, 2026

Copy link
Copy Markdown
Member

Summary of Changes

Just a test PR to preview discussion items from #1361. Removes patch limitation of Ruff workflow and checks the entire repository (excluding 2 Friedland notebooks).

Related GitHub Issue(s)

AI/LLM Usage

Additional Context for Reviewers

Submitter's Checklist

  • I have reviewed and am adhering to the standards outlined in the project Governing Doc.
  • The PR subject title summarizes the changes, with one proper prefix ([FIX], [FEAT], [DOCS], [TST], [CHORE], or [BRK]).
  • I am a human (not a bot), and this PR form is written by a human.

Reviewer's Checklist

  • The implementation addresses the associated issue(s).
  • The implementation is appropriate, maintainable, and follows ARCHITECTURE.md.
  • PR subject title has the proper prefix and the subject is appropriate.
  • Relevant issue(s) are linked.
  • AI/LLM usage is disclosed and appropriate.
  • Documentation and tests are appropriate.
  • CI tests passed, or any failures are acceptable.
  • Leave a comment with the final recommendation (e.g. approve as is, request a secondary review, or flag an area for more review).

Note

Medium Risk
Full-repo Ruff is CI/tooling-only; the __setitem__ slice behavior change is user-facing and could affect code that relied on old tri[:] semantics.

Overview
Switches Ruff from diff-scoped checks to linting and format-checking the whole repo in GitHub Actions (.github/workflows/ruff.yml) and the pre-push hook (.pre-commit-config.yaml), dropping the changed-files/git-base logic and the empty inline per-file-ignores override on ruff check.

Fixes Triangle column assignment when the key is a full slice: tri[:] = value now broadcasts via iloc (pandas-style) instead of treating : as a column name; partial slice keys raise TypeError, with new tests in test_slicing.py.

The rest is Ruff-driven style (quotes, wrapping, trailing commas, docstrings) across package code, docs config/notebooks, and small test fixes (e.g. test_outstanding expected array shapes).

Reviewed by Cursor Bugbot for commit 08d0120. Bugbot is set up for automated code reviews on this repo. Configure here.

@codecov

codecov Bot commented Sep 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.75000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 91.77%. Comparing base (320d0b3) to head (08d0120).

Files with missing lines Patch % Lines
chainladder/tails/clark.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1364   +/-   ##
=======================================
  Coverage   91.76%   91.77%           
=======================================
  Files          96       96           
  Lines        5475     5480    +5     
  Branches      706      708    +2     
=======================================
+ Hits         5024     5029    +5     
  Misses        327      327           
  Partials      124      124           
Flag Coverage Δ
unittests 91.77% <93.75%> (+<0.01%) ⬆️

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

☔ 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.

@github-actions

Copy link
Copy Markdown

Pyright Type Completeness

View the full pyright --verifytypes output for this commit

Project (full chainladder package, at this PR's head): 15.0% of exported symbols fully typed (208 / 1384)

Known Ambiguous Unknown Total
Project (head) 208 111 1065 1384

Other symbols referenced but not exported by chainladder: 13

Known Ambiguous Unknown Total
Other (head) 3 1 9 13

Symbols without documentation:

  • Functions without docstring: 327
  • Functions without default param: 0
  • Classes without docstring: 10

Patch (exported symbols added or changed by this PR): 0.0% fully typed (0 / 2)

Known Ambiguous Unknown Total
Patch 0 0 2 2
Patch symbol details
Symbol Status Change
chainladder.core.tests.test_slicing.test_setitem_full_slice_broadcasts_value ❌ unknown new
chainladder.core.tests.test_slicing.test_setitem_partial_slice_raises ❌ unknown new

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 08d0120. Configure here.

Comment thread chainladder/core/slice.py
if isinstance(key, slice):
if key == slice(None, None, None):
self.iloc[:] = value
return

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full-slice assignment fails on sparse

Medium Severity

tri[:] = value always delegates to iloc, which rejects the sparse backend. Callers then get an error that tells them to use .at or .iat, even though this is column-style assignment. Sparse triangles (for example prism) cannot use the new full-slice API, and the test skips that backend rather than covering it.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 08d0120. Configure here.

@henrydingliu

Copy link
Copy Markdown
Member

i didn't realize so much of the format was concentrated on chapter 8. i believe Priyam was already working on that.

let's land #1323, #1342, and #1361 first. we can tackle this right after?

@genedan

genedan commented Sep 15, 2026

Copy link
Copy Markdown
Member Author

k, will do

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.

2 participants