def library_changes(before: Library, after: Library) -> List[Change]: changes: List[Change] = [] changes.extend( intersect_changes(before.protocols, after.protocols, protocol_changes)) changes.extend( intersect_changes(before.structs, after.structs, struct_changes)) return changes
def libraries_changes(before: Libraries, after: Libraries, comparator: Comparator) -> List[Change]: # Only analyze libraries that exist before and after return intersect_changes(before, after, library_changes, comparator, include_decl_added_and_decl_removed=False)
def libraries_changes( before: Libraries, after: Libraries, identifier_compatibility: Dict[str, bool]) -> List[Change]: # Only analyze libraries that exist before and after return intersect_changes(before, after, library_changes, identifier_compatibility, include_decl_added_and_decl_removed=False)
def protocol_changes(before: Protocol, after: Protocol, comparator: Comparator) -> List[Change]: return intersect_changes(before.methods, after.methods, method_changes, comparator)
def protocol_changes( before: Protocol, after: Protocol, identifier_compatibility: Dict[str, bool]) -> List[Change]: return intersect_changes(before.methods, after.methods, method_changes, identifier_compatibility)