mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
style: black formatting for asqav.py and usage_endpoints.py
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
936a394e1c
commit
e2c31fd471
2 changed files with 23 additions and 5 deletions
|
|
@ -370,17 +370,29 @@ class AsqavLogger(CustomLogger):
|
|||
# ------------------------------------------------------------------
|
||||
|
||||
def log_success_event(
|
||||
self, kwargs: dict[str, Any], response_obj: Any, start_time: Any, end_time: Any # noqa: ANN401
|
||||
self,
|
||||
kwargs: dict[str, Any],
|
||||
response_obj: Any,
|
||||
start_time: Any,
|
||||
end_time: Any, # noqa: ANN401
|
||||
) -> None:
|
||||
self._build_and_append(kwargs, response_obj, start_time, end_time, "success")
|
||||
|
||||
def log_failure_event(
|
||||
self, kwargs: dict[str, Any], response_obj: Any, start_time: Any, end_time: Any # noqa: ANN401
|
||||
self,
|
||||
kwargs: dict[str, Any],
|
||||
response_obj: Any,
|
||||
start_time: Any,
|
||||
end_time: Any, # noqa: ANN401
|
||||
) -> None:
|
||||
self._build_and_append(kwargs, response_obj, start_time, end_time, "failure")
|
||||
|
||||
async def async_log_success_event(
|
||||
self, kwargs: dict[str, Any], response_obj: Any, start_time: Any, end_time: Any # noqa: ANN401
|
||||
self,
|
||||
kwargs: dict[str, Any],
|
||||
response_obj: Any,
|
||||
start_time: Any,
|
||||
end_time: Any, # noqa: ANN401
|
||||
) -> None:
|
||||
await asyncio.to_thread(
|
||||
self._build_and_append,
|
||||
|
|
@ -392,7 +404,11 @@ class AsqavLogger(CustomLogger):
|
|||
)
|
||||
|
||||
async def async_log_failure_event(
|
||||
self, kwargs: dict[str, Any], response_obj: Any, start_time: Any, end_time: Any # noqa: ANN401
|
||||
self,
|
||||
kwargs: dict[str, Any],
|
||||
response_obj: Any,
|
||||
start_time: Any,
|
||||
end_time: Any, # noqa: ANN401
|
||||
) -> None:
|
||||
await asyncio.to_thread(
|
||||
self._build_and_append,
|
||||
|
|
|
|||
|
|
@ -175,7 +175,9 @@ def _get_config_loaded_guardrails() -> list[Any]:
|
|||
]
|
||||
|
||||
|
||||
def _find_config_loaded_guardrail(guardrail_id_or_name: str) -> Optional[Any]: # noqa: ANN401
|
||||
def _find_config_loaded_guardrail(
|
||||
guardrail_id_or_name: str,
|
||||
) -> Optional[Any]: # noqa: ANN401
|
||||
for guardrail in _get_config_loaded_guardrails():
|
||||
gid, display_name = _get_guardrail_attrs(guardrail)
|
||||
if guardrail_id_or_name in (gid, display_name):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue