mirror of
https://github.com/aclist/dztui.git
synced 2026-08-25 17:32:36 +02:00
chore: clear typehinting errors
This commit is contained in:
parent
a1c0592c7d
commit
65e11ddd03
@ -9,6 +9,7 @@ import gi
|
|||||||
gi.require_version("Gtk", "3.0")
|
gi.require_version("Gtk", "3.0")
|
||||||
from gi.repository import Gtk # noqa E402
|
from gi.repository import Gtk # noqa E402
|
||||||
|
|
||||||
|
|
||||||
class AbortDialog(Gtk.MessageDialog):
|
class AbortDialog(Gtk.MessageDialog):
|
||||||
def __init__(self, string: str, buttons: Gtk.ButtonsType) -> None:
|
def __init__(self, string: str, buttons: Gtk.ButtonsType) -> None:
|
||||||
super().__init__(
|
super().__init__(
|
||||||
@ -23,7 +24,7 @@ class AbortDialog(Gtk.MessageDialog):
|
|||||||
|
|
||||||
aa = self.get_action_area()
|
aa = self.get_action_area()
|
||||||
aa.set_margin_bottom(20)
|
aa.set_margin_bottom(20)
|
||||||
aa.set_layout(Gtk.ButtonBoxStyle.CENTER)
|
aa.set_layout(Gtk.ButtonBoxStyle.CENTER) # type: ignore
|
||||||
|
|
||||||
self.outer = self.get_content_area()
|
self.outer = self.get_content_area()
|
||||||
self.outer.set_margin_start(30)
|
self.outer.set_margin_start(30)
|
||||||
@ -51,11 +52,12 @@ class AbortDialog(Gtk.MessageDialog):
|
|||||||
print("response was cancel")
|
print("response was cancel")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
class EarlyAlertDialog(AbortDialog):
|
class EarlyAlertDialog(AbortDialog):
|
||||||
def __init__(self, string: str, buttons: Gtk.ButtonsType) -> None:
|
def __init__(self, string: str) -> None:
|
||||||
super().__init__(string=string, buttons=Gtk.ButtonsType.OK)
|
super().__init__(string=string, buttons=Gtk.ButtonsType.OK)
|
||||||
|
|
||||||
|
|
||||||
class EarlyIgnoreDialog(AbortDialog):
|
class EarlyIgnoreDialog(AbortDialog):
|
||||||
def __init__(self, string: str) -> None:
|
def __init__(self, string: str) -> None:
|
||||||
super().__init__(string=string, buttons=Gtk.ButtonsType.OK_CANCEL)
|
super().__init__(string=string, buttons=Gtk.ButtonsType.OK_CANCEL)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user