lint: fix E741 ambiguous variable names and F841 unused variable
Lint / Shell (shellcheck) (push) Successful in 15s
Lint / JS (eslint) (push) Successful in 13s
Lint / Python (ruff) (push) Successful in 6s
Lint / Python deps (pip-audit) (push) Successful in 43s
Lint / Secret scan (gitleaks) (push) Successful in 5s

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-22 00:41:55 -04:00
parent e4dbcfde7a
commit 0dada4c2b7
+4 -5
View File
@@ -1266,7 +1266,7 @@ async def cmd_hangman(client: AsyncClient, room_id: str, sender: str, args: str)
display = _hangman_display(game) display = _hangman_display(game)
wrong = game["wrong_count"] wrong = game["wrong_count"]
guessed = sorted(game["guessed_letters"]) guessed = sorted(game["guessed_letters"])
wrong_letters = [l for l in guessed if l not in game["word"]] wrong_letters = [ch for ch in guessed if ch not in game["word"]]
plain = ( plain = (
f"Hangman already in progress!\n" f"Hangman already in progress!\n"
f"{_HANGMAN_STAGES[wrong]}\n" f"{_HANGMAN_STAGES[wrong]}\n"
@@ -1370,7 +1370,7 @@ async def cmd_guess(client: AsyncClient, room_id: str, sender: str, args: str):
await send_html(client, room_id, plain, html) await send_html(client, room_id, plain, html)
return return
wrong_letters = sorted(l for l in game["guessed_letters"] if l not in word) wrong_letters = sorted(ch for ch in game["guessed_letters"] if ch not in word)
plain = ( plain = (
f"'{letter.upper()}' is in the word!\n" f"'{letter.upper()}' is in the word!\n"
f"{_HANGMAN_STAGES[game['wrong_count']]}\n" f"{_HANGMAN_STAGES[game['wrong_count']]}\n"
@@ -1389,7 +1389,7 @@ async def cmd_guess(client: AsyncClient, room_id: str, sender: str, args: str):
game["wrong_count"] += 1 game["wrong_count"] += 1
wrong_count = game["wrong_count"] wrong_count = game["wrong_count"]
display = _hangman_display(game) display = _hangman_display(game)
wrong_letters = sorted(l for l in game["guessed_letters"] if l not in word) wrong_letters = sorted(ch for ch in game["guessed_letters"] if ch not in word)
if wrong_count >= 6: if wrong_count >= 6:
del _HANGMAN_GAMES[room_id] del _HANGMAN_GAMES[room_id]
@@ -1598,7 +1598,6 @@ async def cmd_wyr(client: AsyncClient, room_id: str, sender: str, args: str):
if hasattr(resp, "event_id"): if hasattr(resp, "event_id"):
await send_reaction(client, room_id, resp.event_id, "🅰️") await send_reaction(client, room_id, resp.event_id, "🅰️")
await send_reaction(client, room_id, resp.event_id, "🅱️") await send_reaction(client, room_id, resp.event_id, "🅱️")
event_id = resp.event_id
async def reveal(): async def reveal():
await asyncio.sleep(30) await asyncio.sleep(30)
@@ -1976,7 +1975,7 @@ async def cmd_debate(client: AsyncClient, room_id: str, sender: str, args: str):
against_text = against_part.strip() against_text = against_part.strip()
else: else:
# Fallback: try to split in half # Fallback: try to split in half
lines = [l.strip() for l in text.split("\n") if l.strip()] lines = [ln.strip() for ln in text.split("\n") if ln.strip()]
mid = len(lines) // 2 mid = len(lines) // 2
for_text = " ".join(lines[:mid]) if lines else "No argument generated." for_text = " ".join(lines[:mid]) if lines else "No argument generated."
against_text = " ".join(lines[mid:]) if lines else "No argument generated." against_text = " ".join(lines[mid:]) if lines else "No argument generated."