diff --git a/dzgui/managers/filter.py b/dzgui/managers/filter.py index 5204d35..38aaa7d 100644 --- a/dzgui/managers/filter.py +++ b/dzgui/managers/filter.py @@ -109,7 +109,7 @@ class FilterManager: for m in clean: self.append_map([m]) - def get_all_filters(self) -> tuple: + def get_all_filters(self) -> tuple[str, ...]: map_name = self.get_active_map_name() enabled = self.get_filters() kw = self.get_active_keyword() diff --git a/dzgui/views/components/buttons.py b/dzgui/views/components/buttons.py index 2fb62eb..c073059 100644 --- a/dzgui/views/components/buttons.py +++ b/dzgui/views/components/buttons.py @@ -1,4 +1,4 @@ -from typing import Callable, Literal, Self, TYPE_CHECKING +from typing import Callable, Literal, Self, TYPE_CHECKING, Union from dzgui.util.clip import copy_clipboard from dzgui.strings import buttons @@ -12,7 +12,6 @@ from dzgui.const.icons import ( ICON_LIST_ADD, ICON_REFRESH, ICON_STEAM, - ICON_WARNING, ICON_WEB_BROWSER, ) from dzgui.strings import connect_panel @@ -99,9 +98,8 @@ class LargeIconTextButton(IconButton): class ClipboardButton(IconTextButton): - def __init__(self, controller: Union["Controller", None], func: Callable) -> None: + def __init__(self, func: Callable[[], str]) -> None: super().__init__(ICON_CLIPBOARD, atomic_buttons.copy) - self.controller = controller self.connect("clicked", self._on_button_clicked, func) self.set_tooltip_text(buttons.clipboard_button)