Skip to content

Commit

Permalink
fix: mypy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenfonseca committed Sep 1, 2023
1 parent 39b27a0 commit e71dd19
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion aws_lambda_powertools/utilities/idempotency/idempotency.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import functools
import logging
import os
from inspect import isclass
from typing import Any, Callable, Dict, Optional, Type, Union, cast

from aws_lambda_powertools.middleware_factory import lambda_handler_decorator
Expand Down Expand Up @@ -137,7 +138,7 @@ def process_order(customer_id: str, order: dict, **kwargs):
),
)

if issubclass(output_serializer, BaseIdempotencyModelSerializer):
if isclass(output_serializer) and issubclass(output_serializer, BaseIdempotencyModelSerializer):
# instantiate an instance of the serializer class
output_serializer = output_serializer.instantiate(function.__annotations__.get("return", None))

Expand Down

0 comments on commit e71dd19

Please sign in to comment.