mirror of
https://github.com/aclist/dztui.git
synced 2026-11-01 23:52:47 +01:00
fix: name collision between function signature and variable
This commit is contained in:
1 parent
69135150c7
commit
c4818d2097
1 file changed
+10
-8
+10
-8
@@ -71,21 +71,21 @@ def get_local_signatures(version_file: Path) -> dict[str, int]:
|
|||||||
for line in lines:
|
for line in lines:
|
||||||
data = line.split(",")
|
data = line.split(",")
|
||||||
_id = data[0]
|
_id = data[0]
|
||||||
_hash = int(data[1])
|
mod_hash = int(data[1])
|
||||||
hashes[_id] = _hash
|
hashes[_id] = mod_hash
|
||||||
return hashes
|
return hashes
|
||||||
|
|
||||||
|
|
||||||
def get_needs_update(
|
def get_needs_update(
|
||||||
version_file: Path, remote_hashes: list[tuple[str, str, int, int]]
|
version_file: Path, remote_hashes: list[tuple[str, str, int, int]]
|
||||||
) -> list[tuple[str, str, int, int]]:
|
) -> list[tuple[str, str, int, int]]:
|
||||||
local_hashes = get_local_signatures(version_file)
|
local_stamps = get_local_signatures(version_file)
|
||||||
needs_update: list[tuple[str, str, int, int]] = []
|
needs_update: list[tuple[str, str, int, int]] = []
|
||||||
for title, _id, mod_hash, size in remote_hashes:
|
for title, _id, stamp, size in remote_hashes:
|
||||||
if _id not in local_hashes:
|
if _id not in local_stamps:
|
||||||
needs_update.append((title, _id, mod_hash, size))
|
needs_update.append((title, _id, stamp, size))
|
||||||
elif _hash != local_hashes[_id]:
|
elif stamp != local_stamps[_id]:
|
||||||
needs_update.append((title, _id, mod_hash, size))
|
needs_update.append((title, _id, stamp, size))
|
||||||
else:
|
else:
|
||||||
continue
|
continue
|
||||||
return needs_update
|
return needs_update
|
||||||
@@ -252,6 +252,7 @@ def subscribe(key: str, mod: int) -> None:
|
|||||||
def unsubscribe(key: str, mod: int) -> None:
|
def unsubscribe(key: str, mod: int) -> None:
|
||||||
update_workshop(key, mod, UNSUB_ENDPOINT)
|
update_workshop(key, mod, UNSUB_ENDPOINT)
|
||||||
|
|
||||||
|
|
||||||
def gen_shortcut() -> None:
|
def gen_shortcut() -> None:
|
||||||
# TODO:
|
# TODO:
|
||||||
"""
|
"""
|
||||||
@@ -265,6 +266,7 @@ def gen_shortcut() -> None:
|
|||||||
# STEAMID_64 & 0xFFFFFFFF
|
# STEAMID_64 & 0xFFFFFFFF
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
@deprecated("Use subscribe()")
|
@deprecated("Use subscribe()")
|
||||||
def enqueue_mod(client: str, mod: str, appid: int) -> None:
|
def enqueue_mod(client: str, mod: str, appid: int) -> None:
|
||||||
client_args = concat_bash_args(client)
|
client_args = concat_bash_args(client)
|
||||||
|
|||||||
Reference in new issue
Block a user