mirror of
https://github.com/aclist/dztui.git
synced 2026-10-30 14:42:54 +01:00
chore: fix linting errors
This commit is contained in:
1 parent
f05374bc7d
commit
2beea2af20
4 files changed
+5
-15
No files matched your search
@@ -35,7 +35,7 @@ def get_config(path: Path) -> dict:
|
|||||||
def get_favorites(path: Path) -> list[str]:
|
def get_favorites(path: Path) -> list[str]:
|
||||||
try:
|
try:
|
||||||
conf = get_config(path)
|
conf = get_config(path)
|
||||||
except Exception as e:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
return conf["ip_list"]
|
return conf["ip_list"]
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ def enum_to_key(enum: Preferences) -> str:
|
|||||||
def get_client_index(client: str) -> int:
|
def get_client_index(client: str) -> int:
|
||||||
if client == STEAM_CMD:
|
if client == STEAM_CMD:
|
||||||
return 0
|
return 0
|
||||||
elif client == FLATPAK_RUN_CMD:
|
if client == FLATPAK_RUN_CMD:
|
||||||
return 1
|
return 1
|
||||||
else:
|
if client == FLATPAK_SANDBOX:
|
||||||
return 2
|
return 2
|
||||||
@@ -19,7 +19,7 @@ from dzgui.api.mods import (
|
|||||||
_hash,
|
_hash,
|
||||||
remove_stale_signatures,
|
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 (
|
from dzgui.const.constants import (
|
||||||
APPID_DAYZ,
|
APPID_DAYZ,
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
from warnings import deprecated
|
|
||||||
from typing import Self, Union, TYPE_CHECKING
|
from typing import Self, Union, TYPE_CHECKING
|
||||||
|
|
||||||
from dzgui.const.enum import NotebookPage, ServerTab
|
from dzgui.const.enum import NotebookPage, ServerTab
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
from typing import Callable, TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
from dzgui.const.constants import SEPARATOR
|
from dzgui.const.constants import SEPARATOR
|
||||||
from dzgui.util.keys import is_navkey
|
from dzgui.util.keys import is_navkey
|
||||||
@@ -52,15 +52,6 @@ class TreeView(CursorMixin, Gtk.TreeView): # type: ignore
|
|||||||
) -> None:
|
) -> None:
|
||||||
pass
|
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:
|
def _separate(self, model: Gtk.ListStore, iter_: Gtk.TreeIter) -> bool:
|
||||||
if model[iter_][0] == SEPARATOR:
|
if model[iter_][0] == SEPARATOR:
|
||||||
return True
|
return True
|
||||||
|
|||||||
Reference in new issue
Block a user