Skip to content

Commit 05497a5

Browse files
authored
Fix public symbol checker flaky case (#3825)
1 parent 721beb8 commit 05497a5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/public_symbols_checker.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,11 @@ def remove_common_symbols():
123123
del removed_symbols[file_path]
124124

125125

126-
if added_symbols or removed_symbols:
126+
# If a symbol is added and removed in the same commit, we consider it as not
127+
# added or removed.
128+
remove_common_symbols()
127129

128-
# If a symbol is added and removed in the same commit, we consider it
129-
# as not added or removed.
130-
remove_common_symbols()
130+
if added_symbols or removed_symbols:
131131
print("The code in this branch adds the following public symbols:")
132132
print()
133133
for file_path_, symbols_ in added_symbols.items():

0 commit comments

Comments
 (0)