From 05497a53051c9b2d93ec1da9d3284b7c9cff830f Mon Sep 17 00:00:00 2001 From: Aaron Abbott Date: Fri, 29 Mar 2024 18:05:21 -0400 Subject: [PATCH] Fix public symbol checker flaky case (#3825) --- scripts/public_symbols_checker.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/public_symbols_checker.py b/scripts/public_symbols_checker.py index 05b7ad4abb4..c8bf7fd22e7 100644 --- a/scripts/public_symbols_checker.py +++ b/scripts/public_symbols_checker.py @@ -123,11 +123,11 @@ def remove_common_symbols(): del removed_symbols[file_path] -if added_symbols or removed_symbols: +# If a symbol is added and removed in the same commit, we consider it as not +# added or removed. +remove_common_symbols() - # If a symbol is added and removed in the same commit, we consider it - # as not added or removed. - remove_common_symbols() +if added_symbols or removed_symbols: print("The code in this branch adds the following public symbols:") print() for file_path_, symbols_ in added_symbols.items():