Skip to content

Commit

Permalink
fix(ruyipkg): hashlib._Hash cannot be used outside of type-checking
Browse files Browse the repository at this point in the history
Fixes: 47dcdae ("refactor(ruyipkg): fix typing of checksum.py")
  • Loading branch information
xen0n committed Jan 23, 2024
1 parent 2e9dc6e commit 1e3e4e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ruyi/ruyipkg/checksum.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
SUPPORTED_CHECKSUM_KINDS = {"sha256", "sha512"}


def get_hash_instance(kind: str) -> hashlib._Hash:
def get_hash_instance(kind: str) -> 'hashlib._Hash':
if kind not in SUPPORTED_CHECKSUM_KINDS:
raise ValueError(f"checksum algorithm {kind} not supported")
return hashlib.new(kind)
Expand Down

0 comments on commit 1e3e4e7

Please sign in to comment.