Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

fix lint review feedback (round 2)

HUAHAODIAd84e0eabf349
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
}
}