fix(router): use PEP 585 frozenset[str] to satisfy UP006 strict budget - #33493
Draft
cursor[bot] wants to merge 1 commit into
Draft
fix(router): use PEP 585 frozenset[str] to satisfy UP006 strict budget#33493cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
Co-authored-by: Krrish Dholakia <krrish-berri-2@users.noreply.github.com>
|
|
Contributor
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Relevant issues
Linear ticket
Pre-Submission checklist
Screenshots / Proof of Fix
Before this fix,
LiteLLM Linting > Check strict-rule budget (delta vs base)on the promote-staging-to-main PR #33491 (head 39c01fe) failed with:Run log: https://github.com/BerriAI/litellm/actions/runs/29464302114
After this fix, running the same gate locally against the same base:
Type
🐛 Bug Fix
Changes
PR #32926 introduced
self.team_public_model_names: FrozenSet[str] = frozenset()atlitellm/router.py:499using the deprecatedtyping.FrozenSet, which trips ruff's UP006 non-pep585-annotation rule and pushed the repo one violation over the strict-rule ceiling (12794 vs. limit 12792). Switching the annotation to the PEP 585 built-in genericfrozenset[str]and dropping the now-unusedFrozenSetimport brings the count back down to the base level and clears the gate.Final Attestation