ruff: Fix SIM117 Use a single with statement with multiple contexts.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2024-07-14 11:30:42 -07:00
committed by Tim Abbott
parent b0f144327d
commit b96feb34f6
47 changed files with 1380 additions and 1141 deletions

View File

@@ -66,9 +66,11 @@ def main() -> None:
args = parser.parse_args()
sns_topic_arn = get_ses_arn(session, args)
with our_sqs_queue(session, sns_topic_arn) as (queue_arn, queue_url):
with our_sns_subscription(session, sns_topic_arn, queue_arn):
print_messages(session, queue_url)
with (
our_sqs_queue(session, sns_topic_arn) as (queue_arn, queue_url),
our_sns_subscription(session, sns_topic_arn, queue_arn),
):
print_messages(session, queue_url)
def get_ses_arn(session: boto3.session.Session, args: argparse.Namespace) -> str: