Skip to content

Commit 2935843

Browse files
committed
chore: Stupid import inside function definition, so I don't have to struggle with tests not running on github actions
1 parent 52a8cd2 commit 2935843

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

game/utils/tui.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from copy import deepcopy
33
from time import sleep
44

5-
from pynput import keyboard
65
from rich.console import Console
76
from rich.live import Live
87

@@ -26,6 +25,10 @@ def prepare_display(game_map: Map, state: dict) -> str:
2625

2726

2827
def detect_key_input(state: dict, lock):
28+
from pynput import (
29+
keyboard, # todo: fix this, this is placed here to avoid errors when running tests on github actions
30+
)
31+
2932
def on_press(key):
3033
try:
3134
if key.char == "p":

0 commit comments

Comments
 (0)