From 491c6d85fdde2c721fc99a5ede6966e546619a09 Mon Sep 17 00:00:00 2001 From: linhongyu510 Date: Mon, 26 Oct 2026 02:40:26 +0800 Subject: [PATCH] fix(proxy): drop redundant cast import to satisfy strict-ruff gate _value_type_name already annotates its parameter as object, so the extra cast(object, ...) wrapper and the 'cast' import are unnecessary. --- litellm/proxy/proxy_cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/proxy/proxy_cli.py b/litellm/proxy/proxy_cli.py index a392b7cfae8..c880b4a1810 100644 --- a/litellm/proxy/proxy_cli.py +++ b/litellm/proxy/proxy_cli.py @@ -9,7 +9,7 @@ import sys import urllib.parse as urlparse from collections.abc import Iterable, Mapping, Sequence from pathlib import Path -from typing import TYPE_CHECKING, Any, Final, cast +from typing import TYPE_CHECKING, Any, Final, cast # noqa: TID251 # cast is called at runtime below import click import httpx @@ -1312,7 +1312,7 @@ def run_server( elif not isinstance(general_settings, dict): raise ValueError( "`general_settings` in the proxy config must be a mapping " - f"(got {_value_type_name(cast(object, general_settings))}). Check the " + f"(got {_value_type_name(cast(object, general_settings))}). Check the " # cast-ok: untyped YAML config; only runtime class name read for the error "`general_settings:` block in your config file." ) ### LOAD KEY MANAGEMENT SETTINGS FIRST (needed for custom secret manager) ###