Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -491,5 +491,5 @@ def _lookup_exception_handler(self, exc: BaseException) -> Callable | None:
# of an exception
for cls in type(exc).__mro__:
if cls in self._exception_handlers:
return self._exception_handlers[cls] # type: ignore[index] # ty: ignore[invalid-argument-type]
return self._exception_handlers[cls] # type: ignore[index]
return None
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

import logging
from typing import TYPE_CHECKING, Any
from typing import TYPE_CHECKING, Any, cast

from aws_lambda_powertools.utilities.kafka.serialization.base import OutputSerializerBase

Expand All @@ -23,4 +23,6 @@ class CustomDictOutputSerializer(OutputSerializerBase):

def serialize(self, data: dict[str, Any], output: type[T] | Callable | None = None) -> T | dict[str, Any]:
logger.debug("Serializing output data with CustomDictOutputSerializer")
return data if output is None else output(data) # type: ignore[call-arg]
if output is None:
return data
return cast("Callable[[dict[str, Any]], T]", output)(data)
40 changes: 20 additions & 20 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ mkdocs-llmstxt = ">=0.2,<0.5"
avro = "^1.12.0"
protobuf = ">=6.30.2,<8.0.0"
types-protobuf = ">=6.30.2.20250516,<8.0.0.0"
ty = ">=0.0.23,<0.0.50"
ty = ">=0.0.23,<0.0.85"

[tool.coverage.run]
source = ["aws_lambda_powertools"]
Expand Down
Loading