Fix ruff lint errors across matrixbot (F401, F841, E402)
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:
+2
-3
@@ -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 = (
|
||||
|
||||
Reference in New Issue
Block a user