fix(lint): document PLC0415 suppressions on new mcp_server_manager imports - #32666
Draft
cursor[bot] wants to merge 2 commits into
Draft
fix(lint): document PLC0415 suppressions on new mcp_server_manager imports#32666cursor[bot] wants to merge 2 commits into
cursor[bot] wants to merge 2 commits into
Conversation
…ports The local imports added in #32302 to invalidate the per-user OAuth token cache were suppressed with a bare `# noqa: PLC0415`, no reason. That tripped LIT003 in scripts/check_type_discipline.py and put the total at 295 vs the budget of 292, so 'promote internal staging to main' PRs fail the type-discipline gate. Annotate each of the three imports with why the local import is required (breaking the circular import between mcp_server_manager and its callers) so the gate returns to 292. Co-authored-by: Krrish Dholakia <krrish-berri-2@users.noreply.github.com>
Co-authored-by: Krrish Dholakia <krrish-berri-2@users.noreply.github.com>
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
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
Run logs for the failing
LiteLLM Lintingcheck on the last 'promote internal staging to main' PR (#32663, run https://github.com/BerriAI/litellm/actions/runs/29042243698):After this branch,
scripts/type_discipline_gate.py --base origin/litellm_internal_stagingprintsand the LIT003 total across
litellm/drops back to 289 (matching the ratcheted budget)Type
🐛 Bug Fix
Changes
The three local
from litellm.proxy._experimental.mcp_server.mcp_server_manager import ...imports added in #32302 (to invalidate the per-user OAuth token cache after writing / deleting a credential) were suppressed with a bare# noqa: PLC0415, no reason. That tripped LIT003 inscripts/check_type_discipline.py, which requires# noqa: XXX # <reason>, and pushed the codebase total from 292 to 295 vs the same budget of 292. Every 'promote internal staging to main' PR then failed the type-discipline gateAnnotate each of the three imports with why the local import is required (breaking the circular import between
mcp_server_managerand its callers), then runmake lint-budget-updateso the LIT003 ceiling ratchets from 292 to 289