File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed
aws_lambda_powertools/middleware_factory
tests/functional/middleware_factory/required_dependencies Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 33 [`Middleware Factory`](../utilities/middleware_factory.md)
44"""
55
6- from .factory import lambda_handler_decorator
6+ from aws_lambda_powertools . middleware_factory .factory import lambda_handler_decorator
77
88__all__ = ["lambda_handler_decorator" ]
Original file line number Diff line number Diff line change 44import inspect
55import logging
66import os
7- from typing import Any , Callable
7+ from typing import TYPE_CHECKING , Any
88
99from aws_lambda_powertools .middleware_factory .exceptions import MiddlewareInvalidArgumentError
1010from aws_lambda_powertools .shared import constants
1313
1414logger = logging .getLogger (__name__ )
1515
16+ if TYPE_CHECKING :
17+ from collections .abc import Callable
18+
1619
1720# Maintenance: we can't yet provide an accurate return type without ParamSpec etc. see #1066
1821def lambda_handler_decorator (decorator : Callable | None = None , trace_execution : bool | None = None ) -> Callable :
Original file line number Diff line number Diff line change 1+ from __future__ import annotations
2+
13import json
2- from typing import Callable
4+ from typing import TYPE_CHECKING
35
46import pytest
57
810 MiddlewareInvalidArgumentError ,
911)
1012
13+ if TYPE_CHECKING :
14+ from collections .abc import Callable
15+
1116
1217@pytest .fixture
1318def say_hi_middleware () -> Callable :
You can’t perform that action at this time.
0 commit comments