From c667921a21f718b5051f764eff9ab4d1325cec6b Mon Sep 17 00:00:00 2001 From: Giancarlo Romeo Date: Fri, 20 Sep 2024 14:21:27 +0200 Subject: [PATCH] remove unused type ignore --- packages/aws-library/src/aws_library/s3/_client.py | 2 +- packages/aws-library/src/aws_library/ssm/_client.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/aws-library/src/aws_library/s3/_client.py b/packages/aws-library/src/aws_library/s3/_client.py index 74364ce4e19..5d1b357dead 100644 --- a/packages/aws-library/src/aws_library/s3/_client.py +++ b/packages/aws-library/src/aws_library/s3/_client.py @@ -78,7 +78,7 @@ async def create( ) assert isinstance(session_client, ClientCreatorContext) # nosec exit_stack = contextlib.AsyncExitStack() - s3_client = cast(S3Client, await exit_stack.enter_async_context(session_client)) # type: ignore[arg-type] + s3_client = cast(S3Client, await exit_stack.enter_async_context(session_client)) # NOTE: this triggers a botocore.exception.ClientError in case the connection is not made to the S3 backend await s3_client.list_buckets() diff --git a/packages/aws-library/src/aws_library/ssm/_client.py b/packages/aws-library/src/aws_library/ssm/_client.py index 4cc09ac4eb8..a46bf14bf93 100644 --- a/packages/aws-library/src/aws_library/ssm/_client.py +++ b/packages/aws-library/src/aws_library/ssm/_client.py @@ -56,7 +56,7 @@ async def create(cls, settings: SSMSettings) -> "SimcoreSSMAPI": ) assert isinstance(session_client, ClientCreatorContext) # nosec exit_stack = contextlib.AsyncExitStack() - ec2_client = cast(SSMClient, await exit_stack.enter_async_context(session_client)) # type: ignore[arg-type] + ec2_client = cast(SSMClient, await exit_stack.enter_async_context(session_client)) return cls(ec2_client, session, exit_stack) async def close(self) -> None: