Add static typing for utils.MessageDialog

This commit is contained in:
Romain Failliot 2022-01-09 15:16:55 -05:00
parent 133011bbf5
commit 94aa293f1a
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ from gi.repository import Gtk # type: ignore # noqa: E402
# convenience class for displaying a message dialogue # convenience class for displaying a message dialogue
class MessageDialog(Gtk.MessageDialog): class MessageDialog(Gtk.MessageDialog):
def __init__(self, parent, message_type, s): def __init__(self, parent: Gtk.Widget, message_type: Gtk.MessageType, s: str) -> None:
if message_type == Gtk.MessageType.ERROR: if message_type == Gtk.MessageType.ERROR:
buttons = Gtk.ButtonsType.OK buttons = Gtk.ButtonsType.OK
else: else: