From 6008c9643e9bc98eac0d7990eefb39828cffce3a Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Fri, 12 Jun 2026 01:27:16 +0000 Subject: [PATCH] chore(translation): satisfy ruff 0.15 preview gates in errors.py --- litellm/translation/errors.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/litellm/translation/errors.py b/litellm/translation/errors.py index 5e2e20b801..2e42cbda60 100644 --- a/litellm/translation/errors.py +++ b/litellm/translation/errors.py @@ -12,10 +12,9 @@ from __future__ import annotations from dataclasses import dataclass from typing import Literal -from typing_extensions import assert_never - from expression import Result, case, tag, tagged_union from expression.collections import Block +from typing_extensions import assert_never from .ir import Body, ChatRequest @@ -32,7 +31,7 @@ class BoundaryError: failures: Block[str] @staticmethod - def of(failures: Block[str]) -> "BoundaryError": + def of(failures: Block[str]) -> BoundaryError: summary = "; ".join(failures) if len(failures) > 0 else "invalid request" return BoundaryError(summary=summary, failures=failures) @@ -45,11 +44,11 @@ class TranslationError: unsupported: str = case() @staticmethod - def of_boundary(value: BoundaryError) -> "TranslationError": + def of_boundary(value: BoundaryError) -> TranslationError: return TranslationError(boundary=value) @staticmethod - def of_unsupported(reason: str) -> "TranslationError": + def of_unsupported(reason: str) -> TranslationError: return TranslationError(unsupported=reason) @property