From d84e0eabf3495b6fae2e949b5b6955ba1dc4fd2e Mon Sep 17 00:00:00 2001 From: HUAHAODIA Date: Mon, 14 Sep 2026 16:42:35 +0800 Subject: [PATCH] fix lint review feedback (round 2) - actually drop the ruff-strict-budget.json changes: the earlier checkout restored the edited HEAD version instead of main, so the twelve limit changes were still in the branch; budget ratcheting stays with the scheduled automation - annotate validator_call as Final per repo convention - drop the standalone comment duplicating the inline noqa reason --- .../team_metadata_validation.py | 3 +-- ruff-strict-budget.json | 24 +++++++++---------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/litellm/proxy/management_helpers/team_metadata_validation.py b/litellm/proxy/management_helpers/team_metadata_validation.py index 98edb4fb692..76477ab2988 100644 --- a/litellm/proxy/management_helpers/team_metadata_validation.py +++ b/litellm/proxy/management_helpers/team_metadata_validation.py @@ -116,8 +116,7 @@ async def run_team_metadata_validation( }, ) if not inspect.iscoroutinefunction(validator): - # Value unwrap so iscoroutinefunction can see through functors; not a callability test - validator_call = getattr(validator, "__call__", None) # noqa: B004 # value unwrap for functor check + validator_call: Final = getattr(validator, "__call__", None) # noqa: B004 # value unwrap for the functor check if not inspect.iscoroutinefunction(validator_call): raise HTTPException( status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, diff --git a/ruff-strict-budget.json b/ruff-strict-budget.json index dafdc3d10aa..d63a69de76f 100644 --- a/ruff-strict-budget.json +++ b/ruff-strict-budget.json @@ -30,7 +30,7 @@ "limit": 11 }, "B004": { - "limit": 0 + "limit": 2 }, "B006": { "limit": 176 @@ -45,13 +45,13 @@ "limit": 187 }, "B018": { - "limit": 0 + "limit": 2 }, "B019": { "limit": 1 }, "B021": { - "limit": 0 + "limit": 1 }, "B026": { "limit": 3 @@ -63,7 +63,7 @@ "limit": 8 }, "C404": { - "limit": 0 + "limit": 1 }, "C405": { "limit": 19 @@ -75,7 +75,7 @@ "limit": 4 }, "C419": { - "limit": 0 + "limit": 1 }, "C901": { "limit": 306 @@ -138,13 +138,13 @@ "limit": 46 }, "PLR0124": { - "limit": 0 + "limit": 1 }, "PLR0206": { - "limit": 0 + "limit": 1 }, "PLR1704": { - "limit": 0 + "limit": 1 }, "PLR1714": { "limit": 253 @@ -213,16 +213,16 @@ "limit": 6 }, "SIM201": { - "limit": 0 + "limit": 1 }, "SIM210": { "limit": 8 }, "SIM211": { - "limit": 0 + "limit": 1 }, "SIM222": { - "limit": 0 + "limit": 1 }, "SIM401": { "limit": 11 @@ -255,6 +255,6 @@ "limit": 2 }, "UP036": { - "limit": 0 + "limit": 1 } }