From 3aa7b0dd8ecc61a2e18def843d49ddfe441129fa Mon Sep 17 00:00:00 2001 From: Mecaneer23 <74385377+Mecaneer23@users.noreply.github.com> Date: Mon, 10 Jun 2024 14:10:16 -0500 Subject: [PATCH] refactor: remove unnecessary param --- src/acurses.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/acurses.py b/src/acurses.py index c6894f4..4958af6 100644 --- a/src/acurses.py +++ b/src/acurses.py @@ -94,9 +94,9 @@ def put(self, item: int, block: bool = True, timeout: float | None = None) -> No """Add an item to the queue""" self._raw_input.put(item, block, timeout) - def get(self, block: bool = True, timeout: float | None = None) -> int: + def get(self, timeout: float = 0) -> int: """Get an item from the queue""" - return self._raw_input.get(block, timeout) + return self._raw_input.get(timeout=timeout) def empty(self) -> bool: """Return whether the queue is empty""" @@ -157,7 +157,7 @@ def getch(self) -> int: esc = now() while now() - esc < _SHORT_TIME_SECONDS: try: - char = _GETCH.get(timeout=_SHORT_TIME_SECONDS) + char = _GETCH.get(_SHORT_TIME_SECONDS) except queue_empty: break if char not in current: @@ -207,12 +207,10 @@ def _addstr( raise NotImplementedError("Cannot add NoneType: not a string") @overload - def addstr(self, text: str, attr: int = 0) -> None: - ... + def addstr(self, text: str, attr: int = 0) -> None: ... @overload - def addstr(self, y: int, x: int, text: str, attr: int = 0) -> None: - ... + def addstr(self, y: int, x: int, text: str, attr: int = 0) -> None: ... def addstr(self, *args: Any, **kwargs: Any) -> None: """Add a string to the screen at a specific position"""