From 0f69e47f50a4ea687e081ac3dbed53df49b515e8 Mon Sep 17 00:00:00 2001 From: mecaneer23 Date: Wed, 17 Apr 2024 20:08:52 -0500 Subject: [PATCH] refactor: fix typo and remove unnecessary params --- src/acurses.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/acurses.py b/src/acurses.py index 0372bf2..cc34e57 100644 --- a/src/acurses.py +++ b/src/acurses.py @@ -93,7 +93,7 @@ def getch(self) -> int: def move(self, new_y: int, new_x: int) -> None: """Move cursor to (new_y, new_x)""" - stdout.write(f"\033[{self._begin_y + new_y + 1};{self._begin_x + new_x + 3}H") + stdout.write(f"\033[{self._begin_y + new_y + 1};{self._begin_x + new_x + 1}H") def _parse_attrs(self, attrs: int) -> str: """Convert a binary `attrs` into ANSI escape codes""" @@ -131,8 +131,7 @@ def addstr(self, *args: Any, **kwargs: Any) -> None: self._addstr(*args, **kwargs) @_addstr.register(str) - def _(self, text: str, attr: int = 0, _: None = None, __: None = None) -> None: - _ = __ + def _(self, text: str, attr: int = 0) -> None: ansi_attrs = self._parse_attrs(attr) stdout.write(f"{ansi_attrs}{text}{_ANSI_RESET if ansi_attrs else ''}") stdout.flush()