mirror of
https://github.com/aclist/dztui.git
synced 2026-11-10 03:50:38 +01:00
chore: clear typehinting errors
This commit is contained in:
1 parent
598973104c
commit
8da264686a
3 files changed
+6
-4
No files matched your search
+2
-2
@@ -58,7 +58,7 @@ class ModButtonMeta:
|
||||
class ButtonTypeMeta:
|
||||
label: str
|
||||
tooltip: str
|
||||
opens: NotebookPage
|
||||
opens: NotebookPage | None
|
||||
|
||||
|
||||
@dataclass(slots=True, frozen=True)
|
||||
@@ -295,7 +295,7 @@ class ButtonType(Enum):
|
||||
return self.value.tooltip
|
||||
|
||||
@property
|
||||
def opens(self) -> str:
|
||||
def opens(self) -> NotebookPage | None:
|
||||
return self.value.opens
|
||||
|
||||
|
||||
|
||||
@@ -196,7 +196,9 @@ class Controller(GObject.GObject):
|
||||
def show_developers_page(self) -> None:
|
||||
self.open_page(NotebookPage.DEVELOPERS)
|
||||
|
||||
def open_page(self, page: NotebookPage) -> None:
|
||||
def open_page(self, page: NotebookPage | None) -> None:
|
||||
if page is None:
|
||||
return
|
||||
self.mediator.grid.notebook.set_page_by_enum(page)
|
||||
|
||||
def open_page_by_button(self, button: "ContextualButton") -> None:
|
||||
|
||||
@@ -19,7 +19,7 @@ if TYPE_CHECKING:
|
||||
|
||||
class ContextualButton(Gtk.Button):
|
||||
def __init__(
|
||||
self, label: str, opens: "NotebookPage", tooltip: str, context: ButtonType
|
||||
self, label: str, opens: "NotebookPage" | None, tooltip: str, context: ButtonType
|
||||
) -> None:
|
||||
super().__init__(
|
||||
label=label,
|
||||
|
||||
Reference in new issue
Block a user