mirror of
https://github.com/aclist/dztui.git
synced 2026-11-07 02:20:39 +01:00
chore: clear typehinting errors
This commit is contained in:
1 parent
cacfab35bf
commit
2d265c4b9b
19 files changed
+74
-44
No files matched your search
@@ -153,14 +153,14 @@ class ServerNotebook(Gtk.ScrolledWindow):
|
||||
if tv is not None:
|
||||
self.controller.populate_model(tv)
|
||||
|
||||
def get_active_treeview(self) -> ServerTreeView | None:
|
||||
def get_active_treeview(self) -> ServerTreeView:
|
||||
index = self.notebook.get_current_page()
|
||||
scrollable = self.notebook.get_nth_page(index)
|
||||
if scrollable is not None and hasattr(scrollable, "get_children"):
|
||||
tv = scrollable.get_children()[0]
|
||||
if isinstance(tv, ServerTreeView):
|
||||
return tv
|
||||
return None
|
||||
raise ValueError("No treeview set")
|
||||
|
||||
def add_notification(self) -> None:
|
||||
saved = self.notebook.get_nth_page(1)
|
||||
|
||||
Reference in new issue
Block a user