chore: clear typehinting errors

This commit is contained in:
aclist committed 2026-04-28 21:41:07 +09:00
1 parent 3d33d4f1e0
commit 52d51f2bd7
14 files changed
+50 -41

No files matched your search

+6 -2
View File
@@ -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()]
+1 -1
View File
@@ -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 = {}
+3 -1
View File
@@ -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))