Linting
This commit is contained in:
parent
f33d8b8170
commit
53077aacb0
|
@ -1,3 +1,5 @@
|
|||
from typing import List
|
||||
|
||||
from dungeonbattle.menus import Menu, MainMenu
|
||||
from .display import Display
|
||||
|
||||
|
@ -54,7 +56,7 @@ class MenuDisplay(Display):
|
|||
return self.trueheight + 2
|
||||
|
||||
@property
|
||||
def values(self):
|
||||
def values(self) -> List[str]:
|
||||
return [str(a) for a in self.menu.values]
|
||||
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ class Game:
|
|||
elif key == ' ':
|
||||
return KeyValues.SPACE
|
||||
|
||||
def handle_key_pressed(self, key: KeyValues, screen) -> None:
|
||||
def handle_key_pressed(self, key: KeyValues, screen: Any) -> None:
|
||||
"""
|
||||
Indicates what should be done when the given key is pressed,
|
||||
according to the current game state.
|
||||
|
|
|
@ -31,13 +31,16 @@ class MainMenuValues(Enum):
|
|||
class MainMenu(Menu):
|
||||
values = [e for e in MainMenuValues]
|
||||
|
||||
|
||||
class SettingsMenu(Menu):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
def update_values(self, settings : Settings):
|
||||
|
||||
def update_values(self, settings: Settings) -> None:
|
||||
s = settings.dumps_to_string()
|
||||
self.values = s[6:-2].replace("\"", "").split(",\n ")
|
||||
|
||||
|
||||
class ArbitraryMenu(Menu):
|
||||
def __init__(self, values: list):
|
||||
super().__init__()
|
||||
|
|
Loading…
Reference in New Issue