url_file.py: remove the unnecessary str() wrapping around the hexdigest() (#34891)

remove the unnecessary str() wrapping around the hexdigest()
This commit is contained in:
Dean Lee
2025-03-17 20:23:57 +08:00
committed by GitHub
parent d1042df632
commit 5cffaf5bb5
+1 -2
View File
@@ -16,8 +16,7 @@ CHUNK_SIZE = 1000 * K
logging.getLogger("urllib3").setLevel(logging.WARNING)
def hash_256(link: str) -> str:
hsh = str(sha256((link.split("?")[0]).encode('utf-8')).hexdigest())
return hsh
return sha256((link.split("?")[0]).encode('utf-8')).hexdigest()
class URLFileException(Exception):