From 5cffaf5bb5e2756e8dcbb4f38621bc76c152950c Mon Sep 17 00:00:00 2001 From: Dean Lee Date: Mon, 17 Mar 2025 20:23:57 +0800 Subject: [PATCH] url_file.py: remove the unnecessary str() wrapping around the hexdigest() (#34891) remove the unnecessary str() wrapping around the hexdigest() --- tools/lib/url_file.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/lib/url_file.py b/tools/lib/url_file.py index fe8bd3ea84..b2a11dc77b 100644 --- a/tools/lib/url_file.py +++ b/tools/lib/url_file.py @@ -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):