Skip to content

Commit b1fedf9

Browse files
committed
fixes #532 type hints typo
1 parent 69adaf1 commit b1fedf9

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

deepdiff/operator.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import re
2-
from typing import Any, Optional, List
2+
from typing import Any, Optional, List, TYPE_CHECKING
33
from abc import ABCMeta, abstractmethod
44
from deepdiff.helper import convert_item_or_items_into_compiled_regexes_else_none
55

6+
if TYPE_CHECKING:
7+
from deepdiff import DeepDiff
68

79

810
class BaseOperatorPlus(metaclass=ABCMeta):
@@ -16,7 +18,7 @@ def match(self, level) -> bool:
1618
pass
1719

1820
@abstractmethod
19-
def give_up_diffing(self, level, diff_instance: float) -> bool:
21+
def give_up_diffing(self, level, diff_instance: "DeepDiff") -> bool:
2022
"""
2123
Given a level which includes t1 and t2 in the tree view, and the "distance" between l1 and l2.
2224
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.

docs/custom.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ Base Operator Plus
202202
pass
203203
204204
@abstractmethod
205-
def give_up_diffing(self, level, diff_instance: float) -> bool:
205+
def give_up_diffing(self, level, diff_instance: "DeepDiff") -> bool:
206206
"""
207207
Given a level which includes t1 and t2 in the tree view, and the "distance" between l1 and l2.
208208
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.

0 commit comments

Comments
 (0)