Skip to content

wrong type and description of BaseOperatorPlus.give_up_diffing diff_instance argument #532

Closed
@dpinol

Description

@dpinol

BaseOperatorPlus Interface describes diff_instance as a float

    @abstractmethod
    def give_up_diffing(self, level, diff_instance: float) -> bool:
        """
        Given a level which includes t1 and t2 in the tree view, and the "distance" between l1 and l2.
        do we consider t1 and t2 to be equal or not. The distance is a number between zero to one and is calculated by DeepDiff to measure how similar objects are.
        """

but DeepDiff._use_custom_operator passes the DeepDiff instance instead

        for operator in self.custom_operators:
            if operator.match(level):
                prevent_default = operator.give_up_diffing(level=level, diff_instance=self)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions