Skip to content

Commit dc13d48

Browse files
committed
fix: exception type location
1 parent 79a9490 commit dc13d48

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

aws_lambda_powertools/utilities/batch/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
BasePartialProcessor,
99
BatchProcessor,
1010
EventType,
11-
ExceptionInfo,
1211
FailureResponse,
1312
SuccessResponse,
1413
batch_processor,
1514
)
15+
from aws_lambda_powertools.utilities.batch.exceptions import ExceptionInfo
1616
from aws_lambda_powertools.utilities.batch.sqs import PartialSQSProcessor, sqs_batch_processor
1717

1818
__all__ = (

aws_lambda_powertools/utilities/batch/base.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@
88
import sys
99
from abc import ABC, abstractmethod
1010
from enum import Enum
11-
from types import TracebackType
1211
from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union, overload
1312

1413
from aws_lambda_powertools.middleware_factory import lambda_handler_decorator
15-
from aws_lambda_powertools.utilities.batch.exceptions import BatchProcessingError
14+
from aws_lambda_powertools.utilities.batch.exceptions import BatchProcessingError, ExceptionInfo
1615
from aws_lambda_powertools.utilities.data_classes.dynamo_db_stream_event import DynamoDBRecord
1716
from aws_lambda_powertools.utilities.data_classes.kinesis_stream_event import KinesisStreamRecord
1817
from aws_lambda_powertools.utilities.data_classes.sqs_event import SQSRecord
@@ -30,7 +29,6 @@ class EventType(Enum):
3029
# type specifics
3130
#
3231
has_pydantic = "pydantic" in sys.modules
33-
ExceptionInfo = Tuple[Type[BaseException], BaseException, TracebackType]
3432

3533
# For IntelliSense and Mypy to work, we need to account for possible SQS, Kinesis and DynamoDB subclasses
3634
# We need them as subclasses as we must access their message ID or sequence number metadata via dot notation

aws_lambda_powertools/utilities/batch/exceptions.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
Batch processing exceptions
33
"""
44
import traceback
5-
from typing import List, Optional
5+
from types import TracebackType
6+
from typing import List, Optional, Tuple, Type
67

7-
from aws_lambda_powertools.utilities.batch import ExceptionInfo
8+
ExceptionInfo = Tuple[Type[BaseException], BaseException, TracebackType]
89

910

1011
class BaseBatchProcessingError(Exception):

0 commit comments

Comments
 (0)