Skip to content

Commit 9d09336

Browse files
singledigitclaude
andcommitted
fix: resolve mypy no-any-return in _register_updated_task_definition
Annotate new_arn as Optional[str] to satisfy mypy's no-any-return check on the dict.get() chain from boto3 response. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent b3a7232 commit 9d09336

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

samcli/lib/sync/flows/ecs_container_sync_flow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ def _register_updated_task_definition(self, image_uri: str) -> Optional[str]:
221221
LOG.warning("%sFailed to register new task definition revision", self.log_prefix, exc_info=True)
222222
return None
223223

224-
new_arn = reg_response.get("taskDefinition", {}).get("taskDefinitionArn")
224+
new_arn: Optional[str] = reg_response.get("taskDefinition", {}).get("taskDefinitionArn")
225225
LOG.info("%sRegistered new task definition revision: %s", self.log_prefix, new_arn)
226226
return new_arn
227227

0 commit comments

Comments
 (0)