Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dpinol opened this issue Mar 23, 2025 · 0 comments

Comments

@dpinol
Copy link

dpinol commented Mar 23, 2025

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant