diff options
| author | Zoltan Szabatin <[email protected]> | 2025-03-01 04:06:54 -0800 |
|---|---|---|
| committer | Zoltan Szabatin <[email protected]> | 2025-03-01 04:06:54 -0800 |
| commit | e2629e5cacd69f76c28db681265a12e1da366e46 (patch) | |
| tree | 37dcd957781ff9109b124fe423b83772f851e66c /src | |
| parent | chore(justfile): Add formatting task (diff) | |
| download | splitscreen-duo-e2629e5cacd69f76c28db681265a12e1da366e46.tar.xz splitscreen-duo-e2629e5cacd69f76c28db681265a12e1da366e46.zip | |
style(src): Format files
Diffstat (limited to 'src')
| -rw-r--r-- | src/splitscreen_duo/__init__.py | 4 | ||||
| -rw-r--r-- | src/splitscreen_duo/menu.py | 6 | ||||
| -rw-r--r-- | 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 - |