From 2beea2af2035021f39dc290360be06dba625ccba Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Sat, 24 Jan 2026 13:33:15 +0900 Subject: [PATCH] chore: fix linting errors --- dzgui/config/query.py | 6 +++--- dzgui/controllers/mc.py | 2 +- dzgui/views/components/statusbar.py | 1 - dzgui/views/trees/tree_base.py | 11 +---------- 4 files changed, 5 insertions(+), 15 deletions(-) diff --git a/dzgui/config/query.py b/dzgui/config/query.py index 7e77af3..50f3c34 100644 --- a/dzgui/config/query.py +++ b/dzgui/config/query.py @@ -35,7 +35,7 @@ def get_config(path: Path) -> dict: def get_favorites(path: Path) -> list[str]: try: conf = get_config(path) - except Exception as e: + except Exception: pass return conf["ip_list"] @@ -54,7 +54,7 @@ def enum_to_key(enum: Preferences) -> str: def get_client_index(client: str) -> int: if client == STEAM_CMD: return 0 - elif client == FLATPAK_RUN_CMD: + if client == FLATPAK_RUN_CMD: return 1 - else: + if client == FLATPAK_SANDBOX: return 2 diff --git a/dzgui/controllers/mc.py b/dzgui/controllers/mc.py index dd5594b..b2843e6 100644 --- a/dzgui/controllers/mc.py +++ b/dzgui/controllers/mc.py @@ -19,7 +19,7 @@ from dzgui.api.mods import ( _hash, remove_stale_signatures, ) -from dzgui.const.enum import Preferences, NotebookPage, ButtonType, ContextMenu, RowType +from dzgui.const.enum import Preferences, NotebookPage, ButtonType, ContextMenu from dzgui.const.constants import ( APPID_DAYZ, diff --git a/dzgui/views/components/statusbar.py b/dzgui/views/components/statusbar.py index 73ff261..c66f213 100644 --- a/dzgui/views/components/statusbar.py +++ b/dzgui/views/components/statusbar.py @@ -1,4 +1,3 @@ -from warnings import deprecated from typing import Self, Union, TYPE_CHECKING from dzgui.const.enum import NotebookPage, ServerTab diff --git a/dzgui/views/trees/tree_base.py b/dzgui/views/trees/tree_base.py index f5e44b4..b428d53 100644 --- a/dzgui/views/trees/tree_base.py +++ b/dzgui/views/trees/tree_base.py @@ -1,6 +1,6 @@ import logging -from typing import Callable, TYPE_CHECKING +from typing import TYPE_CHECKING from dzgui.const.constants import SEPARATOR from dzgui.util.keys import is_navkey @@ -52,15 +52,6 @@ class TreeView(CursorMixin, Gtk.TreeView): # type: ignore ) -> None: pass - # @deprecated("signals are localized now") - # def signal_emission(func: Callable) -> Callable: - # def wrapper(self, *args, **kwargs): - # self.controller.block_signals() - # func(self, *args, **kwargs) - # self.controller.unblock_signals() - # - # return wrapper - def _separate(self, model: Gtk.ListStore, iter_: Gtk.TreeIter) -> bool: if model[iter_][0] == SEPARATOR: return True