From a950cd638a1bec64d17531d4fbf8293bb7610925 Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Mon, 15 Nov 2021 23:49:09 +0100 Subject: Avoid redefining function exit Signed-off-by: Olivier Gayot --- cameltris/screens/in_game.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cameltris/screens/in_game.py') diff --git a/cameltris/screens/in_game.py b/cameltris/screens/in_game.py index 840c0b9..469bdfd 100644 --- a/cameltris/screens/in_game.py +++ b/cameltris/screens/in_game.py @@ -36,10 +36,10 @@ class InGame(Screen): self.screen: pygame.surface.Surface = screen self.event_handler: dict[int, Callable[[pygame.event.Event], None]] = {} - def exit(_) -> NoReturn: + def exit_(_) -> NoReturn: sys.exit() - self.event_handler[pygame.QUIT] = exit + self.event_handler[pygame.QUIT] = exit_ self.event_handler[pygame.KEYDOWN] = partial(handle_input_pressed, KeyboardController, self.players) self.event_handler[pygame.KEYUP] = partial(handle_input_released, KeyboardController, self.players) self.event_handler[pygame.JOYBUTTONDOWN] = partial(handle_input_pressed, JoystickController, self.players) -- cgit v1.2.3