diff --git a/tests/unit/llms/anthropic/pass_through/adapters/test_anthropic_experimental_pass_through_adapters_transformation.py b/tests/unit/llms/anthropic/pass_through/adapters/test_anthropic_experimental_pass_through_adapters_transformation.py index 0463d37c4a8..6222aa7aab5 100644 --- a/tests/unit/llms/anthropic/pass_through/adapters/test_anthropic_experimental_pass_through_adapters_transformation.py +++ b/tests/unit/llms/anthropic/pass_through/adapters/test_anthropic_experimental_pass_through_adapters_transformation.py @@ -5589,17 +5589,21 @@ class _FailureLog(CustomLogger): super().__init__() self.rejections: tuple[str, ...] = () - def _record(self, kwargs) -> None: + def _record(self, kwargs: Mapping[str, object]) -> None: error: Final = str(kwargs.get("exception")) self.rejections = ( *self.rejections, next((phrase for phrase in _UPSTREAM_REJECTION_PHRASES if phrase in error), error), ) - def log_failure_event(self, kwargs, response_obj, start_time, end_time) -> None: + def log_failure_event( + self, kwargs: Mapping[str, object], response_obj: object, start_time: object, end_time: object + ) -> None: self._record(kwargs) - async def async_log_failure_event(self, kwargs, response_obj, start_time, end_time) -> None: + async def async_log_failure_event( + self, kwargs: Mapping[str, object], response_obj: object, start_time: object, end_time: object + ) -> None: self._record(kwargs) diff --git a/tests/unit/llms/anthropic/pass_through/responses_adapters/test_responses_adapters_handler.py b/tests/unit/llms/anthropic/pass_through/responses_adapters/test_responses_adapters_handler.py index c11023b256a..320fb6123bf 100644 --- a/tests/unit/llms/anthropic/pass_through/responses_adapters/test_responses_adapters_handler.py +++ b/tests/unit/llms/anthropic/pass_through/responses_adapters/test_responses_adapters_handler.py @@ -804,17 +804,21 @@ class _FailureLog(CustomLogger): super().__init__() self.rejections: tuple[str, ...] = () - def _record(self, kwargs) -> None: + def _record(self, kwargs: Mapping[str, object]) -> None: error: Final = str(kwargs.get("exception")) self.rejections = ( *self.rejections, next((phrase for phrase in ("encrypted content", "organization") if phrase in error), error), ) - def log_failure_event(self, kwargs, response_obj, start_time, end_time) -> None: + def log_failure_event( + self, kwargs: Mapping[str, object], response_obj: object, start_time: object, end_time: object + ) -> None: self._record(kwargs) - async def async_log_failure_event(self, kwargs, response_obj, start_time, end_time) -> None: + async def async_log_failure_event( + self, kwargs: Mapping[str, object], response_obj: object, start_time: object, end_time: object + ) -> None: self._record(kwargs)