From fd7318f3c79ae82efff74fb9d3739edd225eb860 Mon Sep 17 00:00:00 2001 From: Joe Wang Date: Wed, 26 Jun 2024 08:16:53 -0400 Subject: [PATCH] refactor --- library_generation/model/config_change.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/library_generation/model/config_change.py b/library_generation/model/config_change.py index 1b65b004e2..8a5e813244 100644 --- a/library_generation/model/config_change.py +++ b/library_generation/model/config_change.py @@ -149,11 +149,11 @@ def __create_qualified_commit( :return: qualified commits. """ libraries = set() - for file, changes in commit.stats.files.items(): - versioned_proto_path = find_versioned_proto_path(file) + for file_path, changes in commit.stats.files.items(): + versioned_proto_path = find_versioned_proto_path(file_path) if versioned_proto_path in proto_paths: if ( - file.endswith("BUILD.bazel") + file_path.endswith("BUILD.bazel") # Qualify a commit if the commit only added BUILD.bazel # because it's very unlikely that a commit added BUILD.bazel # without adding proto files. Therefore, the commit is @@ -161,7 +161,7 @@ def __create_qualified_commit( and (not ConfigChange.__is_added(changes)) and ( not ConfigChange.__is_qualified_build_change( - commit=commit, build_file_path=file + commit=commit, build_file_path=file_path ) ) ):