From 97cad62e70a9e5a6762c41fc9f31d0554d7c186b Mon Sep 17 00:00:00 2001 From: dinhlongviolin1 Date: Tue, 18 Jun 2024 11:01:54 +0700 Subject: [PATCH] per FV --- tools/frontend/hash_source.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tools/frontend/hash_source.py b/tools/frontend/hash_source.py index b504883993..f85826f10b 100644 --- a/tools/frontend/hash_source.py +++ b/tools/frontend/hash_source.py @@ -51,12 +51,10 @@ def hash_files_in_frontend_folder(frontend_folder): continue # Sort before looping to ensure consistent cache key for file in sorted(files): - for ignore in ignore_file_name: - if ignore in file: - continue - for ignore in ignore_file_extension: - if file.endswith(ignore): - continue + if any(ignore in file for ignore in ignore_file_name): + continue + if any(file.endswith(ignore) for ignore in ignore_file_extension): + continue file_path = os.path.join(root, file) file_hash = hash_file(file_path) file_hashes[file_path] = file_hash