ui: correct mypy definitions

This commit is contained in:
rr-
2018-11-05 21:04:39 +01:00
parent 2b60b80364
commit 6549dbe817
4 changed files with 10 additions and 8 deletions
+4 -4
View File
@@ -25,11 +25,11 @@ class ExitView(urwid.Overlay):
super().__init__(line_box, parent, "center", 20, "middle", 5)
def keypress(self, size: T.Any, key: str) -> bool:
def keypress(self, size: T.Any, key: str) -> T.Optional[str]:
if key in {"y", "Y"}:
self.on_exit()
return True
return None
if key in {"n", "N"}:
self.on_cancel()
return True
return super().keypress(size, key)
return None
return key