mirror of
https://github.com/aclist/dztui.git
synced 2026-08-26 01:37:18 +02:00
chore: clear typehinting errors
This commit is contained in:
parent
d57277f527
commit
41b3ad8eca
@ -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
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user