chore: fix linting errors

This commit is contained in:
aclist 2026-01-24 13:33:15 +09:00
parent f05374bc7d
commit 2beea2af20
4 changed files with 5 additions and 15 deletions

View File

@ -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

View File

@ -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,

View File

@ -1,4 +1,3 @@
from warnings import deprecated
from typing import Self, Union, TYPE_CHECKING
from dzgui.const.enum import NotebookPage, ServerTab

View File

@ -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