Linting
This commit is contained in:
@ -1,11 +1,15 @@
|
||||
import curses
|
||||
from typing import Any, Union
|
||||
|
||||
from typing import Any
|
||||
from dungeonbattle.tests.screen import FakePad
|
||||
|
||||
|
||||
class Display:
|
||||
x: int
|
||||
y: int
|
||||
width: int
|
||||
height: int
|
||||
|
||||
def __init__(self, screen: Any, pack: Any):
|
||||
self.screen = screen
|
||||
self.pack = pack
|
||||
@ -13,19 +17,19 @@ class Display:
|
||||
def newpad(self, height: int, width: int) -> Union[FakePad, Any]:
|
||||
return curses.newpad(height, width) if self.screen else FakePad()
|
||||
|
||||
def resize(self, y, x, height, width):
|
||||
def resize(self, y: int, x: int, height: int, width: int) -> None:
|
||||
self.x = x
|
||||
self.y = y
|
||||
self.width = width
|
||||
self.height = height
|
||||
|
||||
def refresh(self, *args):
|
||||
def refresh(self, *args) -> None:
|
||||
if len(args) == 4:
|
||||
self.resize(*args)
|
||||
self.display()
|
||||
|
||||
def display(self):
|
||||
pass
|
||||
|
||||
def display(self) -> None:
|
||||
raise NotImplementedError
|
||||
|
||||
@property
|
||||
def rows(self) -> int:
|
||||
|
Reference in New Issue
Block a user