Skip to content

Commit 86b4a95

Browse files
author
Bob Strahan
committed
Fix type checking issues in granular assessment service
1 parent 879518a commit 86b4a95

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/idp_common_pkg/idp_common/assessment/granular_service.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def __init__(
152152
import boto3
153153

154154
dynamodb = boto3.resource("dynamodb", region_name=self.region)
155-
self.cache_table = dynamodb.Table(self.cache_table_name)
155+
self.cache_table = dynamodb.Table(self.cache_table_name) # type: ignore[attr-defined]
156156
logger.info(
157157
f"Granular assessment caching enabled using table: {self.cache_table_name}"
158158
)
@@ -1132,8 +1132,8 @@ def _is_throttling_exception(self, exception: Exception) -> bool:
11321132
Returns:
11331133
True if exception indicates throttling, False otherwise
11341134
"""
1135-
if hasattr(exception, "response") and "Error" in exception.response:
1136-
error_code = exception.response["Error"]["Code"]
1135+
if hasattr(exception, "response") and "Error" in exception.response: # type: ignore[attr-defined]
1136+
error_code = exception.response["Error"]["Code"] # type: ignore[attr-defined]
11371137
return error_code in self.throttling_exceptions
11381138

11391139
# Check exception class name and message for throttling indicators

0 commit comments

Comments
 (0)