示例#1
0
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
示例#2
0
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)
示例#3
0
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)
示例#4
0
def protocol_changes(before: Protocol, after: Protocol,
                     comparator: Comparator) -> List[Change]:
    return intersect_changes(before.methods, after.methods, method_changes,
                             comparator)
示例#5
0
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)