Skip to content

Commit 77b15b5

Browse files
fix method overload check (#37244)
Co-authored-by: Catalina Peralta <[email protected]>
1 parent 5ae05fc commit 77b15b5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

scripts/breaking_changes_checker/checkers/method_overloads_checker.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ def run_check(self, diff, stable_nodes, current_nodes):
2727
continue
2828
# Check if all of the overloads were deleted for an existing stable method
2929
if len(method_components.get("overloads", [])) == 0:
30+
if class_name not in stable_nodes[module_name]["class_nodes"]:
31+
# This is a new class, so we don't need to check for removed overloads
32+
continue
3033
if method_name in stable_nodes[module_name]["class_nodes"][class_name]["methods"] and \
3134
"overloads" in stable_nodes[module_name]["class_nodes"][class_name]["methods"][method_name]:
3235
if len(stable_nodes[module_name]["class_nodes"][class_name]["methods"][method_name]["overloads"]) > 0:

0 commit comments

Comments
 (0)