From c212b040b6850422b6b45da6181ce313dc786c4c Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Fri, 12 Nov 2021 19:40:03 +0100 Subject: Rename base class screen module base_screen to make pylint happy Signed-off-by: Olivier Gayot --- __main__.py | 2 +- cameltris/screens/base_screen.py | 11 +++++++++++ cameltris/screens/in_game.py | 2 +- cameltris/screens/pause.py | 2 +- cameltris/screens/screen.py | 11 ----------- 5 files changed, 14 insertions(+), 14 deletions(-) create mode 100644 cameltris/screens/base_screen.py delete mode 100644 cameltris/screens/screen.py diff --git a/__main__.py b/__main__.py index 404d289..d0aeb17 100755 --- a/__main__.py +++ b/__main__.py @@ -7,7 +7,7 @@ import argparse import pygame from cameltris.controller import Controller, KeyboardController, JoystickController -from cameltris.screens.screen import Screen +from cameltris.screens.base_screen import Screen from cameltris.screens.in_game import InGame as InGameScreen, Player from cameltris.screens.pause import Pause as PauseScreen from cameltris.misc import Pause, UnPause diff --git a/cameltris/screens/base_screen.py b/cameltris/screens/base_screen.py new file mode 100644 index 0000000..87c15f4 --- /dev/null +++ b/cameltris/screens/base_screen.py @@ -0,0 +1,11 @@ +import abc + + +class Screen(abc.ABC): + @abc.abstractmethod + def refresh(self) -> None: + pass + + @abc.abstractmethod + def oneframe(self) -> None: + pass diff --git a/cameltris/screens/in_game.py b/cameltris/screens/in_game.py index 1ae20de..46450aa 100644 --- a/cameltris/screens/in_game.py +++ b/cameltris/screens/in_game.py @@ -7,7 +7,7 @@ from typing import Callable, NoReturn, Optional import pygame from ..color import Color -from .screen import Screen +from .base_screen import Screen from ..piece import * from ..playfield import PlayField from ..controller import Input, Controller, KeyboardController, JoystickController diff --git a/cameltris/screens/pause.py b/cameltris/screens/pause.py index 99749f3..72ff51a 100644 --- a/cameltris/screens/pause.py +++ b/cameltris/screens/pause.py @@ -4,7 +4,7 @@ from typing import Callable, NoReturn import pygame -from .screen import Screen +from .base_screen import Screen from ..controller import Controller, KeyboardController, JoystickController, Input from ..misc import UnPause diff --git a/cameltris/screens/screen.py b/cameltris/screens/screen.py deleted file mode 100644 index 87c15f4..0000000 --- a/cameltris/screens/screen.py +++ /dev/null @@ -1,11 +0,0 @@ -import abc - - -class Screen(abc.ABC): - @abc.abstractmethod - def refresh(self) -> None: - pass - - @abc.abstractmethod - def oneframe(self) -> None: - pass -- cgit v1.2.3