diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ipm/models/ipk.py | 2 | ||||
| -rw-r--r-- | src/ipm/utils/hash.py | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/ipm/models/ipk.py b/src/ipm/models/ipk.py index ffe307f..aa7513f 100644 --- a/src/ipm/models/ipk.py +++ b/src/ipm/models/ipk.py @@ -196,7 +196,7 @@ class InfiniProject(InfiniPackage): return self._data["project"]["webpage"] # type: ignore @property - def unzip(self) -> str | int: + def unzip(self) -> Union[str, int]: return self._data["project"]["unzip"] # type: ignore @property diff --git a/src/ipm/utils/hash.py b/src/ipm/utils/hash.py index c1fa37b..7409d37 100644 --- a/src/ipm/utils/hash.py +++ b/src/ipm/utils/hash.py @@ -1,8 +1,9 @@ +from ipm.typing import StrPath from pathlib import Path import hashlib -def ifp_hash(lfp_path: str | Path, block_size=65536) -> bytes: +def ifp_hash(lfp_path: StrPath, block_size=65536) -> bytes: sha256 = hashlib.sha256() with Path(lfp_path).resolve().open("rb") as file: for block in iter(lambda: file.read(block_size), b""): |
