Skip to content

[FIX] Apply Ruff fix to docs/gallery. - #1292

Open
genedan wants to merge 1 commit into
gd_ruff_fixfrom
gd_ruff_fix_plots
Open

[FIX] Apply Ruff fix to docs/gallery.#1292
genedan wants to merge 1 commit into
gd_ruff_fixfrom
gd_ruff_fix_plots

Conversation

@genedan

@genedan genedan commented Sep 4, 2026

Copy link
Copy Markdown
Member

Summary of Changes

This is my first time trying a stacked pull request, #1290 is the base. This one covers all the gallery docs, looking at the notebook diffs doesn't look too bad actually, I was worried we'd have a giant set of unreadable raw diffs.

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
Documentation-only formatting in gallery notebooks with no production code changes.

Overview
Reformats all docs/gallery Jupyter notebooks to match Ruff style: double-quoted strings, wrapped long lines, consistent spacing around operators, and tidier matplotlib/pipeline call layouts. A few notebooks drop redundant imports (e.g. duplicate chainladder imports) and minor comment tweaks (###).

pyproject.toml drops the per-file Ruff ignore overrides that existed only for those gallery paths, since the notebooks now comply.

Notebook logic is unchanged aside from cosmetic edits; plot_capecod_onlevel no longer leaves the return value of intermediate pipe.fit(...) calls as cell output, while plotting still uses named_steps.model.ultimate_ as before.

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

@github-actions

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

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.67%. Comparing base (2054a10) to head (165f6b2).

Additional details and impacted files
@@             Coverage Diff              @@
##           gd_ruff_fix    #1292   +/-   ##
============================================
  Coverage        91.67%   91.67%           
============================================
  Files               93       93           
  Lines             5443     5443           
  Branches           704      704           
============================================
  Hits              4990     4990           
  Misses             328      328           
  Partials           125      125           
Flag Coverage Δ
unittests 91.67% <ø> (ø)

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.

2 participants