chore: clear typehinting errors

This commit is contained in:
aclist committed 2026-11-01 23:45:01 +09:00
1 parent 0cf6439538
commit 0ec1c157f4
2 files changed
+6 -4

No files matched your search

+2 -2
View File
@@ -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:
+4 -2
View File
@@ -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)