|
14 | 14 | from __future__ import absolute_import
|
15 | 15 |
|
16 | 16 | from enum import Enum
|
17 |
| -from typing import List |
| 17 | +from typing import List, Optional |
18 | 18 | import attr
|
19 | 19 |
|
20 | 20 | from sagemaker.workflow.entities import Entity, DefaultEnumMeta, RequestType
|
@@ -133,8 +133,8 @@ def __init__(
|
133 | 133 | exception_types: List[StepExceptionTypeEnum],
|
134 | 134 | backoff_rate: float = 2.0,
|
135 | 135 | interval_seconds: int = 1,
|
136 |
| - max_attempts: int = None, |
137 |
| - expire_after_mins: int = None, |
| 136 | + max_attempts: Optional[int] = None, |
| 137 | + expire_after_mins: Optional[int] = None, |
138 | 138 | ):
|
139 | 139 | super().__init__(backoff_rate, interval_seconds, max_attempts, expire_after_mins)
|
140 | 140 | for exception_type in exception_types:
|
@@ -177,12 +177,12 @@ class SageMakerJobStepRetryPolicy(RetryPolicy):
|
177 | 177 |
|
178 | 178 | def __init__(
|
179 | 179 | self,
|
180 |
| - exception_types: List[SageMakerJobExceptionTypeEnum] = None, |
181 |
| - failure_reason_types: List[SageMakerJobExceptionTypeEnum] = None, |
| 180 | + exception_types: Optional[List[SageMakerJobExceptionTypeEnum]] = None, |
| 181 | + failure_reason_types: Optional[List[SageMakerJobExceptionTypeEnum]] = None, |
182 | 182 | backoff_rate: float = 2.0,
|
183 | 183 | interval_seconds: int = 1,
|
184 |
| - max_attempts: int = None, |
185 |
| - expire_after_mins: int = None, |
| 184 | + max_attempts: Optional[int] = None, |
| 185 | + expire_after_mins: Optional[int] = None, |
186 | 186 | ):
|
187 | 187 | super().__init__(backoff_rate, interval_seconds, max_attempts, expire_after_mins)
|
188 | 188 |
|
|
0 commit comments