[FIX] Apply Ruff fix to chainladder/workflow. - #1297
Open
genedan wants to merge 1 commit into
Open
Conversation
Pyright Type CompletenessView the full Project (full
Other symbols referenced but not exported by
Symbols without documentation:
Patch (exported symbols added or changed by this PR): 0.0% fully typed (0 / 1)
Patch symbol details
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## gd_ruff_fix_tails #1297 +/- ##
==================================================
Coverage 91.66% 91.66%
==================================================
Files 93 93
Lines 5436 5437 +1
Branches 704 704
==================================================
+ Hits 4983 4984 +1
Misses 328 328
Partials 125 125
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
henrydingliu
approved these changes
Sep 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of Changes
Stacked PR on #1290. One fix that may need explaining is turning
callable_weightinto a function. That comes from https://docs.astral.sh/ruff/rules/lambda-assignment/, which specifies that a lambda assigned to a variable is better off as a function.Related GitHub Issue(s)
#1216
Additional Context for Reviewers
Checklist
uv run pytest) and documentation changes (uv run --directory docs jb build . --builder=custom --custom-builder=doctest)Note
Low Risk
Test and formatting-only changes with no production logic changes; lambda-to-function in tests is equivalent behavior.
Overview
Applies Ruff formatting and lint fixes across
chainladder/workflow(voting.pyand workflow tests) so those paths comply without per-file ignores inpyproject.toml.The only behavioral-adjacent change is in tests:
callable_weightis no longer a lambda assigned to a name (Ruff E731); it is a small named function with the same logic, still used in the parametrized weights fixture.Everything else is style: double-quoted strings, trailing commas, type-hint spacing, docstring quote style, method-chain line breaks, comment/whitespace cleanup in
_get_ultimate, and a final newline onvoting.py. Ruff per-file-ignores fortest_voting.py,test_workflow.py, andvoting.pyare removed now that the files are clean.Reviewed by Cursor Bugbot for commit 9577b40. Bugbot is set up for automated code reviews on this repo. Configure here.