diff --git a/graphrag/index/utils/hashing.py b/graphrag/index/utils/hashing.py index 4ee6a98bbf..94f121a0d9 100644 --- a/graphrag/index/utils/hashing.py +++ b/graphrag/index/utils/hashing.py @@ -8,7 +8,7 @@ from typing import Any -def gen_sha512_hash(item: dict[str, Any], hashcode: Iterable[str]): +def gen_sha512_hash(item: dict[str, Any], hashcode: Iterable[str]) -> str: """Generate a SHA512 hash.""" hashed = "".join([str(item[column]) for column in hashcode]) return f"{sha512(hashed.encode('utf-8'), usedforsecurity=False).hexdigest()}"