mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
chore(guardrails): use PEP 604 union for event_hook param
The strict gate's UP007 ceiling dropped on the new base; convert the event_hook Union[...] annotation to X | Y and drop the now-unused Union import.
This commit is contained in:
parent
13f889555d
commit
73dfe12839
1 changed files with 2 additions and 2 deletions
|
|
@ -3,7 +3,7 @@
|
|||
import logging
|
||||
import os
|
||||
from collections import OrderedDict
|
||||
from typing import TYPE_CHECKING, Any, Literal, Optional, Union
|
||||
from typing import TYPE_CHECKING, Any, Literal, Optional
|
||||
|
||||
from fastapi import HTTPException
|
||||
|
||||
|
|
@ -77,7 +77,7 @@ class WonderFenceGuardrail(CustomGuardrail):
|
|||
max_cached_clients: int | None = None,
|
||||
connection_pool_limit: int | None = None,
|
||||
allow_request_metadata_override: bool = False,
|
||||
event_hook: (Union[GuardrailEventHooks, list[GuardrailEventHooks], Mode] | None) = None,
|
||||
event_hook: (GuardrailEventHooks | list[GuardrailEventHooks] | Mode | None) = None,
|
||||
default_on: bool = True,
|
||||
**kwargs: Any,
|
||||
) -> None:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue