Skip to content

[FIX] Apply Ruff fixes to berqsherm.py. - #1278

Merged
genedan merged 1 commit into
mainfrom
gd_ruff_fix
Sep 4, 2026
Merged

[FIX] Apply Ruff fixes to berqsherm.py.#1278
genedan merged 1 commit into
mainfrom
gd_ruff_fix

Conversation

@genedan

@genedan genedan commented Sep 3, 2026

Copy link
Copy Markdown
Member

Summary of Changes

Knocking out chainladder/adjustments/berqsherm.py from the Ruff list. Yeah...we got a long way to go. I tried getting started on bootstrap.py but stopped when the linter was uncovering bugs.

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
Lint-only edits to Berquist–Sherman adjustment code with no intended behavioral change.

Overview
Brings chainladder/adjustments/berqsherm.py into compliance with the project Ruff rules so it no longer needs a per-file ignore entry in pyproject.toml.

Changes are formatting and docstring style only: operator spacing in the exponential regression denominator, whitespace in np.clip, and clearer line breaks around the nested xp.concatenate batching for a and b. The transform docstring is normalized to a standard multi-line form (no logic change in fit or transform).

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

@github-actions

github-actions Bot commented Sep 3, 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 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.68%. Comparing base (5b79e32) to head (660ab7e).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1278   +/-   ##
=======================================
  Coverage   91.68%   91.68%           
=======================================
  Files          93       93           
  Lines        5447     5447           
  Branches      704      704           
=======================================
  Hits         4994     4994           
  Misses        328      328           
  Partials      125      125           
Flag Coverage Δ
unittests 91.68% <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.

@genedan
genedan merged commit ec2bc2d into main Sep 4, 2026
24 checks passed
@genedan
genedan deleted the gd_ruff_fix branch September 4, 2026 03:23
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