File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
aws_lambda_powertools/utilities/batch Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 11"""
22Batch processing exceptions
33"""
4+ from __future__ import annotations
5+
46import traceback
57from types import TracebackType
68from typing import List , Optional , Tuple , Type
911
1012
1113class BaseBatchProcessingError (Exception ):
12- def __init__ (self , msg = "" , child_exceptions : Optional [ List [ExceptionInfo ]] = None ):
14+ def __init__ (self , msg = "" , child_exceptions : List [ExceptionInfo ] | None = None ):
1315 super ().__init__ (msg )
1416 self .msg = msg
15- self .child_exceptions = child_exceptions
17+ self .child_exceptions = child_exceptions or []
1618
1719 def format_exceptions (self , parent_exception_str ):
1820 exception_list = [f"{ parent_exception_str } \n " ]
@@ -27,7 +29,7 @@ def format_exceptions(self, parent_exception_str):
2729class BatchProcessingError (BaseBatchProcessingError ):
2830 """When all batch records failed to be processed"""
2931
30- def __init__ (self , msg = "" , child_exceptions : Optional [ List [ExceptionInfo ]] = None ):
32+ def __init__ (self , msg = "" , child_exceptions : List [ExceptionInfo ] | None = None ):
3133 super ().__init__ (msg , child_exceptions )
3234
3335 def __str__ (self ):
You can’t perform that action at this time.
0 commit comments