Fix ruff lint errors across matrixbot (F401, F841, E402)
Lint / Shell (shellcheck) (push) Successful in 11s
Lint / JS (eslint) (push) Successful in 10s
Lint / Python (ruff) (push) Successful in 10s
Lint / Python deps (pip-audit) (push) Successful in 1m10s
Lint / Secret scan (gitleaks) (push) Successful in 5s

Remove unused imports: logging from bot.py and config.py, RoomMessageText/
UnknownEvent from callbacks.py, functools.partial and MAX_INPUT_LENGTH from
commands.py. Rename unused local variables to _ (resp in cmd_ping, symbols in
render_keyboard_plain, guesses_left in two wordle functions). Move wordle import
to top of commands.py to fix E402.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-20 16:54:55 -04:00
parent d2983eca23
commit 86cb78d74d
5 changed files with 6 additions and 11 deletions
+2 -3
View File
@@ -317,7 +317,6 @@ def render_keyboard_plain(game: WordleGame) -> str:
letter_states[letter] = max(letter_states.get(letter, -1), score)
lines = []
symbols = {-1: " ", 0: "\u2717", 1: "?", 2: "\u2713"}
for row in _KB_ROWS:
chars = []
for letter in row:
@@ -465,7 +464,7 @@ async def wordle_start_or_status(client: AsyncClient, room_id: str, sender: str,
if sender in _active_games:
game = _active_games[sender]
if not game.finished:
guesses_left = 6 - len(game.guesses)
_ = 6 - len(game.guesses)
grid_plain = render_grid_plain(game)
kb_plain = render_keyboard_plain(game)
plain = (
@@ -626,7 +625,7 @@ async def wordle_guess(
return
# Still playing — show grid + keyboard
guesses_left = 6 - len(game.guesses)
_ = 6 - len(game.guesses)
grid_plain = render_grid_plain(game)
kb_plain = render_keyboard_plain(game)
plain = (