Skip to content

Commit a0544ea

Browse files
committed
fixing the type hints for the base
1 parent 185eacb commit a0544ea

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

deepdiff/diff.py

+12-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from enum import Enum
1313
from copy import deepcopy
1414
from math import isclose as is_close
15-
from typing import List, Dict, Callable, Union, Any, Pattern, Tuple, Optional, Set, FrozenSet, TYPE_CHECKING
15+
from typing import List, Dict, Callable, Union, Any, Pattern, Tuple, Optional, Set, FrozenSet, TYPE_CHECKING, Protocol
1616
from collections.abc import Mapping, Iterable, Sequence
1717
from collections import defaultdict
1818
from inspect import getmembers
@@ -119,7 +119,17 @@ def _report_progress(_stats, progress_logger, duration):
119119
)
120120

121121

122-
class DeepDiff(ResultDict, SerializationMixin, DistanceMixin, Base):
122+
class DeepDiffProtocol(Protocol):
123+
t1: Any
124+
t2: Any
125+
cutoff_distance_for_pairs: float
126+
use_log_scale: bool
127+
log_scale_similarity_threshold: float
128+
view: str
129+
130+
131+
132+
class DeepDiff(ResultDict, SerializationMixin, DistanceMixin, DeepDiffProtocol, Base):
123133
__doc__ = doc
124134

125135
CACHE_AUTO_ADJUST_THRESHOLD = 0.25

0 commit comments

Comments
 (0)