diff --git a/litellm/proxy/guardrails/guardrail_hooks/conduct/__init__.py b/litellm/proxy/guardrails/guardrail_hooks/conduct/__init__.py index 52c2ae0db61..2a056ab5b6c 100644 --- a/litellm/proxy/guardrails/guardrail_hooks/conduct/__init__.py +++ b/litellm/proxy/guardrails/guardrail_hooks/conduct/__init__.py @@ -16,7 +16,7 @@ _DEFAULT_TIMEOUT_SECONDS = 8.0 _DEFAULT_UNREACHABLE_FALLBACK = "fail_closed" -def initialize_guardrail(litellm_params: "LitellmParams", guardrail: "Guardrail"): +def initialize_guardrail(litellm_params: "LitellmParams", guardrail: "Guardrail") -> ConductGuardrail: """Initialize the Conduct guardrail from LiteLLM's config block. Maps LiteLLM's typed guardrail fields onto the Conduct constructor: diff --git a/litellm/proxy/guardrails/guardrail_hooks/conduct/conduct.py b/litellm/proxy/guardrails/guardrail_hooks/conduct/conduct.py index 8d010b6673e..a3a872c3035 100644 --- a/litellm/proxy/guardrails/guardrail_hooks/conduct/conduct.py +++ b/litellm/proxy/guardrails/guardrail_hooks/conduct/conduct.py @@ -13,7 +13,7 @@ Docs: https://conductai.ai/guard from __future__ import annotations -from typing import Any, ClassVar +from typing import ClassVar from litellm.integrations.custom_guardrail import CustomGuardrail from litellm.types.guardrails import GuardrailEventHooks @@ -75,7 +75,7 @@ class ConductGuardrail(_ParentClass): # type: ignore[valid-type,misc] # configurations — see veria-ai finding on BerriAI/litellm#38143. SUPPORTED_EVENT_HOOKS: ClassVar[tuple[GuardrailEventHooks, ...]] = (GuardrailEventHooks.pre_call,) - def __init__(self, *args: Any, **kwargs: Any) -> None: + def __init__(self, *args: object, **kwargs: object) -> None: if _IMPORT_ERROR is not None or _BaseConductGuard is None: raise ImportError(_IMPORT_ERROR_MESSAGE) from _IMPORT_ERROR super().__init__(*args, **kwargs)