Skip to content

Commit

Permalink
fix for abstract classes (Azure#35891)
Browse files Browse the repository at this point in the history
Co-authored-by: Catalina Peralta <caperal@microsoft.com>
  • Loading branch information
catalinaperalta and cperaltah authored Jun 4, 2024
1 parent f838ccc commit 2ff9ddb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/breaking_changes_checker/detect_breaking_changes.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,11 @@ def get_properties(cls: Type) -> Dict:
analyzer = ClassTreeAnalyzer(base_class.__name__)
analyzer.visit(module)
cls_node = analyzer.cls_node
get_property_names(cls_node, attribute_names)
if cls_node:
get_property_names(cls_node, attribute_names)
else:
# Abstract base classes fail here, e.g. "collections.abc.MuttableMapping"
_LOGGER.info(f"Unable to get class node for {base_class.__name__}. Skipping...")
else:
get_property_names(cls_node, attribute_names)
return attribute_names
Expand Down

0 comments on commit 2ff9ddb

Please sign in to comment.