Skip to content

[DEPR] Deprecation warning for inplace=True - #1468

Draft
henrydingliu wants to merge 8 commits into
casact:mainfrom
henrydingliu:chore/inplace_returns_none
Draft

henrydingliu wants to merge 8 commits into
casact:mainfrom
henrydingliu:chore/inplace_returns_none

Conversation

@henrydingliu

@henrydingliu henrydingliu commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

Summary of Changes

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

Low Risk
Documentation and type hints only; no change to conversion logic or inplace return behavior yet.

Overview
Documents an upcoming API alignment for Triangle.incr_to_cum and Triangle.cum_to_incr: when inplace=True, returning self is deprecated as of 0.11 and 2.0 is expected to return None (pandas-style inplace).

incr_to_cum also gets explicit typing (inplace: bool = False, return type Self) and imports Self from typing. Runtime behavior is unchanged—both methods still mutate and return self when inplace=True.

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

@github-actions

github-actions Bot commented Oct 4, 2026 •

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.7% of exported symbols fully typed (228 / 1456)

Known Ambiguous Unknown Total
Project (head) 228 108 1120 1456

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: 326
  • Functions without default param: 0
  • Classes without docstring: 8

Patch (exported symbols added or changed by this PR): 100.0% fully typed (1 / 1)

Known Ambiguous Unknown Total
Patch 1 0 0 1
Patch symbol details
Symbol Status Change
chainladder.core.triangle.Triangle.incr_to_cum ✅ known changed (was ❌ unknown)

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

Stale Bugbot comment from a previous run.

Comment thread chainladder/core/triangle.py Outdated

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

Reviewed by Cursor Bugbot for commit 27082d9. Configure here.

Comment thread chainladder/_config/deprecation.py Outdated
@codecov

codecov Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.14%. Comparing base (d046ca3) to head (c070945).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1468   +/-   ##
=======================================
  Coverage   94.14%   94.14%           
=======================================
  Files          96       96           
  Lines        5843     5843           
  Branches      739      739           
=======================================
  Hits         5501     5501           
  Misses        221      221           
  Partials      121      121           
Flag Coverage Δ
unittests 94.14% <100.00%> (ø)

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.

@henrydingliu henrydingliu changed the title [FEAT] new decorator for deprecating inplace=True returning self [DEPR] Deprecation warning for inplace=True Oct 5, 2026
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