Skip to content

Commit 6c77d62

Browse files
committed
Fix lint
1 parent 7e2fd6f commit 6c77d62

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

scripts/public_symbols_checker.py

+12-8
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,11 @@ def get_symbols(change_type, diff_lines_getter, prefix):
7676
def a_diff_lines_getter(diff_lines):
7777
return diff_lines.b_blob.data_stream.read().decode("utf-8").split("\n")
7878

79+
7980
def d_diff_lines_getter(diff_lines):
8081
return diff_lines.a_blob.data_stream.read().decode("utf-8").split("\n")
8182

83+
8284
def m_diff_lines_getter(diff_lines):
8385
return unified_diff(
8486
diff_lines.a_blob.data_stream.read().decode("utf-8").split("\n"),
@@ -91,6 +93,7 @@ def m_diff_lines_getter(diff_lines):
9193
get_symbols("M", m_diff_lines_getter, r"\+")
9294
get_symbols("M", m_diff_lines_getter, r"\-")
9395

96+
9497
def remove_common_symbols():
9598
# For each file, we remove the symbols that are added and removed in the
9699
# same commit.
@@ -115,17 +118,18 @@ def remove_common_symbols():
115118
if not removed_symbols[file_path]:
116119
del removed_symbols[file_path]
117120

121+
118122
if added_symbols or removed_symbols:
119123

120124
# If a symbol is added and removed in the same commit, we consider it
121125
# as not added or removed.
122126
remove_common_symbols()
123127
print("The code in this branch adds the following public symbols:")
124128
print()
125-
for file_path, symbols in added_symbols.items():
126-
print(f"- {file_path}")
127-
for symbol in symbols:
128-
print(f"\t{symbol}")
129+
for file_path_, symbols_ in added_symbols.items():
130+
print(f"- {file_path_}")
131+
for symbol_ in symbols_:
132+
print(f"\t{symbol_}")
129133
print()
130134

131135
print(
@@ -137,10 +141,10 @@ def remove_common_symbols():
137141
print()
138142
print("The code in this branch removes the following public symbols:")
139143
print()
140-
for file_path, symbols in removed_symbols.items():
141-
print(f"- {file_path}")
142-
for symbol in symbols:
143-
print(f"\t{symbol}")
144+
for file_path_, symbols_ in removed_symbols.items():
145+
print(f"- {file_path_}")
146+
for symbol_ in symbols_:
147+
print(f"\t{symbol_}")
144148
print()
145149

146150
print(

0 commit comments

Comments
 (0)