mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-14 23:21:35 +00:00
style: mutable-ok suppression on registry dicts + hook returns
This commit is contained in:
parent
a62337a9ea
commit
2fe6a2ad24
2 changed files with 4 additions and 4 deletions
|
|
@ -66,11 +66,11 @@ def initialize_guardrail(litellm_params: "LitellmParams", guardrail: "Guardrail"
|
|||
return _conduct_callback
|
||||
|
||||
|
||||
guardrail_initializer_registry: Final = {
|
||||
guardrail_initializer_registry: Final = { # mutable-ok: LiteLLM guardrail registry contract
|
||||
SupportedGuardrailIntegrations.CONDUCT.value: initialize_guardrail,
|
||||
}
|
||||
|
||||
|
||||
guardrail_class_registry: Final = {
|
||||
guardrail_class_registry: Final = { # mutable-ok: LiteLLM guardrail registry contract
|
||||
SupportedGuardrailIntegrations.CONDUCT.value: ConductGuardrail,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ except ImportError as _err:
|
|||
|
||||
@classmethod
|
||||
def get_supported_event_hooks(cls) -> list[str]:
|
||||
return list(cls.SUPPORTED_EVENT_HOOKS)
|
||||
return list(cls.SUPPORTED_EVENT_HOOKS) # mutable-ok: LiteLLM registry expects a fresh list
|
||||
|
||||
ConductGuardrailBlocked = None
|
||||
GuardDecision = None
|
||||
|
|
@ -74,7 +74,7 @@ def raise_if_missing_package() -> None:
|
|||
raise ImportError(_import_error_message) from _import_error
|
||||
|
||||
|
||||
__all__ = [
|
||||
__all__ = [ # mutable-ok: standard Python re-export list
|
||||
"ConductGuardrail",
|
||||
"ConductGuardrailBlocked",
|
||||
"GuardDecision",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue