From e2629e5cacd69f76c28db681265a12e1da366e46 Mon Sep 17 00:00:00 2001 From: Zoltan Szabatin Date: Sat, 1 Mar 2025 04:06:54 -0800 Subject: style(src): Format files --- src/splitscreen_duo/__init__.py | 4 +--- src/splitscreen_duo/menu.py | 6 ++++-- src/splitscreen_duo/serial.py | 3 +-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/splitscreen_duo/__init__.py b/src/splitscreen_duo/__init__.py index 84c86f9..aa0aeda 100644 --- a/src/splitscreen_duo/__init__.py +++ b/src/splitscreen_duo/__init__.py @@ -8,9 +8,7 @@ logger = logging.getLogger(__name__) def main() -> int: logging.basicConfig( - level=( - logging.DEBUG if os.getenv("DEVELOPMENT", "").lower() else logging.INFO - ) + level=(logging.DEBUG if os.getenv("DEVELOPMENT", "").lower() else logging.INFO) ) print("The Dual Screen Console") logger.info(f"Running as {os.getenv("INSTANCE", "unknown")}") diff --git a/src/splitscreen_duo/menu.py b/src/splitscreen_duo/menu.py index de51a47..d552dab 100644 --- a/src/splitscreen_duo/menu.py +++ b/src/splitscreen_duo/menu.py @@ -18,7 +18,7 @@ WIDTH, HEIGHT = ( WHITE = (255, 255, 255) BLACK = (0, 0, 0) FONT = pygame.font.Font(None, 36) -IS_DEVELOPMENT_MODE = os.getenv("DEVELOPMENT", "").lower() +IS_DEVELOPMENT_MODE = os.getenv("DEVELOPMENT", "").lower() != "" OPTIONS = ["Breakout", "Pong v.s. Computer", "Snake", "Quit"] selected_index = 0 screen = pygame.display.set_mode( @@ -70,7 +70,9 @@ def main_loop(): sys.exit() else: print(OPTIONS[selected_index]) - serial.write(json.dumps({"command": 0, "action": action}).encode("utf-8")) + serial.write( + json.dumps({"command": 0, "action": action}).encode("utf-8") + ) elif action == "QUIT": pygame.quit() sys.exit() diff --git a/src/splitscreen_duo/serial.py b/src/splitscreen_duo/serial.py index bc9caec..1eb1405 100644 --- a/src/splitscreen_duo/serial.py +++ b/src/splitscreen_duo/serial.py @@ -15,7 +15,6 @@ class Serial: def readline(self): return self.serial.readline() - + def in_waiting(self): return self.serial.in_waiting - -- cgit v1.2.3