Repository navigation
fix(responses): type the cold storage helpers with Mapping so ruff passes on main - #53436
Merged
Merged
Conversation
Contributor
PR overviewNo security issues were found in this pull request. Reviews
|
yucheng-berri
approved these changes
Nov 21, 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.
Handwritten 1-3 sentence description
[insert handwritten description here]
Details
TLDR
Problem this solves:
ruff checkfails on main with F821SpendLogsPayloadHow it solves it:
Mapping[str, object]User Flow
Before: a contributor's PR fails lint on code they never touched
lint / pythonjob fails at "Run Ruff linting" with two F821 errors insession_handler.pyAfter: the same push gets past "Run Ruff linting"
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
uv run pytest tests/unit/<your_test_file>.py -v. Leave the suites (make test-unit-*,make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or moreDelays in PR merge?
If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).
Screenshots / Proof of Fix
E2E exception at f6d00ec.
Scope is two type annotations in
litellm/responses/litellm_completion_transformation/session_handler.py. Rationale is that the diff is mechanical and changes no runtime behavior. Both helpers only ever receiveMapping[str, object]spend logs from their one caller, which is what every other helper in the module already takes after #52768. A lint run is the complete proof here.Ruff at main (03fd3d7), run from
litellm/the way CI doesChecks at f6d00ec
Type
🐛 Bug Fix
Final Attestation