Skip to content

Commit c37e594

Browse files
Fixing types in Python 3.8 and 3.9
1 parent 1c46efd commit c37e594

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

aws_lambda_powertools/utilities/batch/exceptions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
import traceback
88
from types import TracebackType
9-
from typing import Optional, Tuple
9+
from typing import Optional, Tuple, Type
1010

11-
ExceptionInfo = Tuple[Optional[type[BaseException]], Optional[BaseException], Optional[TracebackType]]
11+
ExceptionInfo = Tuple[Optional[Type[BaseException]], Optional[BaseException], Optional[TracebackType]]
1212

1313

1414
class BaseBatchProcessingError(Exception):

aws_lambda_powertools/utilities/batch/types.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from __future__ import annotations
22

33
import sys
4-
from typing import Optional, TypedDict, Union
4+
from typing import Optional, Type, TypedDict, Union
55

66
has_pydantic = "pydantic" in sys.modules
77

@@ -14,9 +14,9 @@
1414
)
1515

1616
BatchTypeModels = Optional[
17-
Union[type[SqsRecordModel], type[DynamoDBStreamRecordModel], type[KinesisDataStreamRecordModel]]
17+
Union[Type[SqsRecordModel], Type[DynamoDBStreamRecordModel], Type[KinesisDataStreamRecordModel]]
1818
]
19-
BatchSqsTypeModel = Optional[type[SqsRecordModel]]
19+
BatchSqsTypeModel = Optional[Type[SqsRecordModel]]
2020
else: # pragma: no cover
2121
BatchTypeModels = "BatchTypeModels" # type: ignore
2222
BatchSqsTypeModel = "BatchSqsTypeModel" # type: ignore

0 commit comments

Comments
 (0)