Skip to content

[FIX] Apply Ruff fix to chainladder/methods. - #1295

Open
genedan wants to merge 2 commits into
gd_ruff_fix_developmentfrom
gd_ruff_fix_methods
Open

[FIX] Apply Ruff fix to chainladder/methods.#1295
genedan wants to merge 2 commits into
gd_ruff_fix_developmentfrom
gd_ruff_fix_methods

Conversation

@genedan

@genedan genedan commented Sep 5, 2026

Copy link
Copy Markdown
Member

Summary of Changes

Stacked pull request on #1290. Fixes chainladder/methods files.

Related GitHub Issue(s)

#1216

Additional Context for Reviewers

Checklist

  • I passed tests locally for both code (uv run pytest) and documentation changes (uv run --directory docs jb build . --builder=custom --custom-builder=doctest)

Note

Low Risk
Cosmetic and lint-only changes; reserve method behavior should be unchanged aside from docstring rendering in MackChainladder.

Overview
Brings chainladder/methods (and its tests) in line with the project Ruff rules as part of the #1216 cleanup stack on #1290. There is no intended change to reserving logic—only style and lint hygiene.

Library code: Drops unused numpy imports from base.py, capecod.py, and top-level mack.py; normalizes quotes, spacing, docstrings, and line breaks (including MackChainladder’s class docstring layout and **2 operator formatting). MethodBase.validate_X keeps the sklearn-style name with an explicit # noqa: N802.

Tests: Same mechanical formatting in test_benktander, test_capecod, test_mack, and test_predict.

Config: Removes the per-file Ruff per-file-ignores entries for those methods modules now that they pass without exemptions.

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

@genedan genedan changed the title Gd ruff fix methods [FIX] Apply Ruff fix to chainladder/methods. Sep 5, 2026
@github-actions

github-actions Bot commented Sep 5, 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.4% of exported symbols fully typed (213 / 1381)

Known Ambiguous Unknown Total
Project (head) 213 111 1057 1381

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

Patch (exported symbols added or changed by this PR): no exported symbol type-completeness changes detected.

@codecov

codecov Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.11765% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 91.66%. Comparing base (2b7f098) to head (198832c).

Files with missing lines Patch % Lines
chainladder/methods/mack.py 87.50% 1 Missing ⚠️
Additional details and impacted files
@@                     Coverage Diff                     @@
##           gd_ruff_fix_development    #1295      +/-   ##
===========================================================
- Coverage                    91.67%   91.66%   -0.01%     
===========================================================
  Files                           93       93              
  Lines                         5440     5437       -3     
  Branches                       704      704              
===========================================================
- Hits                          4987     4984       -3     
  Misses                         328      328              
  Partials                       125      125              
Flag Coverage Δ
unittests 91.66% <94.11%> (-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.

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