mirror of
https://github.com/aclist/dztui.git
synced 2026-11-05 09:34:46 +01:00
chore: clear typehinting errors
This commit is contained in:
1 parent
3d33d4f1e0
commit
52d51f2bd7
14 files changed
+50
-41
No files matched your search
@@ -1,5 +1,5 @@
|
||||
from dataclasses import dataclass
|
||||
from typing import Any, Sequence
|
||||
from typing import Any, Sequence, TYPE_CHECKING
|
||||
|
||||
from dzgui.const.enum import HELP_MENU_ROWS
|
||||
from dzgui.util.redact import redact_log
|
||||
@@ -17,6 +17,10 @@ GTYPE_TO_PYTHON = {
|
||||
}
|
||||
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
@dataclass(slots=True, frozen=True)
|
||||
class ServerCols:
|
||||
name: str
|
||||
@@ -120,7 +124,7 @@ class ModelFactory:
|
||||
def __init__(self) -> None:
|
||||
pass
|
||||
|
||||
def new_model_from_logfile(self, path: str) -> FastInsertListStore:
|
||||
def new_model_from_logfile(self, path: "Path") -> FastInsertListStore:
|
||||
store = self.make_log_store()
|
||||
with open(path, "r") as f:
|
||||
lines = [line.split(delimiter) for line in f.read().splitlines()]
|
||||
|
||||
@@ -246,7 +246,7 @@ class ProxyModelManager:
|
||||
def get_control(self) -> list:
|
||||
return self.control_model
|
||||
|
||||
def wipe_cache(self, full=False) -> None:
|
||||
def wipe_cache(self, full: bool = False) -> None:
|
||||
self.filtered = None
|
||||
self.filter_cache = {}
|
||||
|
||||
|
||||
@@ -251,7 +251,9 @@ class ServerModelManager:
|
||||
proxy_man = self._get_proxy_man()
|
||||
proxy_man.update_playercount(self.playercount)
|
||||
|
||||
def _parse_single_record(self, response: dict, delete: bool = False) -> None:
|
||||
def _parse_single_record(
|
||||
self, response: dict[Any, Any] | None, delete: bool = False
|
||||
) -> None:
|
||||
self.preserve_on_fail = True
|
||||
if response is None:
|
||||
self.thread_man.set_cleanup_func(StoredFunc(self._cleanup_on_failure))
|
||||
|
||||
Reference in new issue
Block a user