ruff: Fix RUF059 Unpacked variable is never used.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2025-09-19 16:54:59 -07:00
committed by Tim Abbott
parent fa4d680851
commit f24a0a6b81
53 changed files with 168 additions and 155 deletions

View File

@@ -326,7 +326,7 @@ async def help_center_middleware(
if request.path.startswith("/help"):
try:
filename = request.match_info["filename"]
name, ext = os.path.splitext(filename)
_name, ext = os.path.splitext(filename)
if not ext:
filename = os.path.join(filename, "index.html")
request.match_info["filename"] = filename

View File

@@ -100,7 +100,7 @@ def create_integration_bot(integration: Integration, bot_name: str | None = None
def create_integration_stream(integration: Integration, bot: UserProfile) -> None:
assert isinstance(bot.bot_owner, UserProfile)
realm = bot.bot_owner.realm
stream, created = create_stream_if_needed(realm, integration.stream_name)
stream, _created = create_stream_if_needed(realm, integration.stream_name)
bulk_add_subscriptions(realm, [stream], [bot, bot.bot_owner], acting_user=bot)

View File

@@ -90,7 +90,7 @@ def get_ses_arn(session: boto3.session.Session, args: argparse.Namespace) -> str
@contextmanager
def our_sqs_queue(session: boto3.session.Session, ses_topic_arn: str) -> Iterator[tuple[str, str]]:
(_, _, _, region, account_id, topic_name) = ses_topic_arn.split(":")
(_, _, _, region, account_id, _topic_name) = ses_topic_arn.split(":")
sqs: SQSClient = session.client("sqs")
queue_name = "tail-ses-" + secrets.token_hex(10)