chore: clear typehinting errors

This commit is contained in:
aclist 2026-05-26 03:59:11 +09:00
parent d57277f527
commit 41b3ad8eca
2 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,7 @@
import shutil
from pathlib import Path
from typing import Any
from dzgui.const.constants import LEGACY_CONFIG_PATH, LEGACY_COLS_PATH, LEGACY_IPS_PATH
from dzgui.config.convert import rc2json
from dzgui.util._json import read_json, write_json
@ -17,7 +18,7 @@ def has_new_config(config: Path) -> bool:
return config.exists()
def convert_cols_file(res: Path) -> dict[str, int] | None:
def convert_cols_file(res: Path) -> Any | None:
j = read_json(res)
cols = j["cols"]
# NOTE: implies prior conversion

View File

@ -12,7 +12,7 @@ def read_json(path: Path) -> Any:
raise e
def write_json(data: dict, path: Path) -> None:
def write_json(data: dict[str, Any], path: Path) -> None:
try:
j = json.dumps(data, indent=2)
path.write_text(j)