From 0ec1c157f4b5adc48f9c8474165ec63cf81e8dc2 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Sun, 1 Nov 2026 23:45:01 +0900 Subject: [PATCH] chore: clear typehinting errors --- dzgui/api/acf.py | 4 ++-- dzgui/api/steam.py | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dzgui/api/acf.py b/dzgui/api/acf.py index 24816a0..ab35b3b 100644 --- a/dzgui/api/acf.py +++ b/dzgui/api/acf.py @@ -71,7 +71,7 @@ class ACF: return acf def search_key(self, key: str) -> str: - return self.dict["AppState"][key] + return str(self.dict["AppState"][key]) def date_to_str(self, epoch: int) -> str | None: if epoch == 0: @@ -89,7 +89,7 @@ class ACF: def get_last_updated(self) -> str | None: return self.get_date_by_key("LastUpdated") - def get_last_played(self) -> str: + def get_last_played(self) -> str | None: return self.get_date_by_key("LastPlayed") def get_allows_downloads(self) -> int | None: diff --git a/dzgui/api/steam.py b/dzgui/api/steam.py index a7f8732..35061c6 100644 --- a/dzgui/api/steam.py +++ b/dzgui/api/steam.py @@ -389,17 +389,19 @@ def get_running_app() -> int | None: return None -def get_last_updated(path: Path, appid: int) -> str: +def get_last_updated(path: Path, appid: int) -> str | None: root_path = get_app_path(path, appid) acf = root_path.joinpath(f"steamapps/appmanifest_{appid}.acf") return ACF(acf).get_last_updated() -def get_last_played(path: Path, appid: int) -> str: + +def get_last_played(path: Path, appid: int) -> str | None: root_path = get_app_path(path, appid) acf = root_path.joinpath(f"steamapps/appmanifest_{appid}.acf") # TODO: make tests for this, use fixtures return ACF(acf).get_last_played() + def get_app_allows_downloads(path: Path, appid: int) -> bool: try: root_path = get_app_path(path, appid)