Skip to content

Commit d2d3806

Browse files
committed
fixing types to be compatible for python 3.8
1 parent 737bb5a commit d2d3806

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

deepdiff/serialization.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
from copy import deepcopy, copy
4545
from functools import partial
4646
from collections.abc import Mapping
47-
from typing import Callable
47+
from typing import Callable, Optional, Union
4848
from deepdiff.helper import (
4949
strings,
5050
get_type,
@@ -180,7 +180,7 @@ def from_json_pickle(cls, value):
180180
else:
181181
logger.error('jsonpickle library needs to be installed in order to run from_json_pickle') # pragma: no cover. Json pickle is getting deprecated.
182182

183-
def to_json(self, default_mapping: dict | None=None, force_use_builtin_json=False, **kwargs):
183+
def to_json(self, default_mapping: Optional[dict]=None, force_use_builtin_json=False, **kwargs):
184184
"""
185185
Dump json of the text view.
186186
**Parameters**
@@ -307,7 +307,7 @@ def _to_delta_dict(self, directed=True, report_repetition_required=True, always_
307307

308308
return deepcopy(dict(result))
309309

310-
def pretty(self, prefix: str | Callable=None):
310+
def pretty(self, prefix: Optional[Union[str, Callable]]=None):
311311
"""
312312
The pretty human readable string output for the diff object
313313
regardless of what view was used to generate the diff.

0 commit comments

Comments
 (0)