Skip to content

Commit de67a42

Browse files
committed
fix docstring examples for doctest errors
1 parent efa1f0e commit de67a42

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

deepdiff/diff.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,7 @@ def _diff_by_forming_pairs_and_comparing_one_by_one(
943943
t2_from_index=None, t2_to_index=None,
944944
):
945945
for (i, j), (x, y) in self._get_matching_pairs(
946-
level,
946+
level,
947947
t1_from_index=t1_from_index, t1_to_index=t1_to_index,
948948
t2_from_index=t2_from_index, t2_to_index=t2_to_index
949949
):
@@ -1939,13 +1939,13 @@ def affected_paths(self):
19391939
Whether a value was changed or they were added or removed.
19401940
19411941
Example
1942+
>>> from pprint import pprint
19421943
>>> t1 = {1: 1, 2: 2, 3: [3], 4: 4}
19431944
>>> t2 = {1: 1, 2: 4, 3: [3, 4], 5: 5, 6: 6}
19441945
>>> ddiff = DeepDiff(t1, t2)
1945-
>>> ddiff
19461946
>>> pprint(ddiff, indent=4)
1947-
{ 'dictionary_item_added': [root[5], root[6]],
1948-
'dictionary_item_removed': [root[4]],
1947+
{ 'dictionary_item_added': ['root[5]', 'root[6]'],
1948+
'dictionary_item_removed': ['root[4]'],
19491949
'iterable_item_added': {'root[3][1]': 4},
19501950
'values_changed': {'root[2]': {'new_value': 4, 'old_value': 2}}}
19511951
>>> ddiff.affected_paths
@@ -1971,13 +1971,13 @@ def affected_root_keys(self):
19711971
Whether a value was changed or they were added or removed.
19721972
19731973
Example
1974+
>>> from pprint import pprint
19741975
>>> t1 = {1: 1, 2: 2, 3: [3], 4: 4}
19751976
>>> t2 = {1: 1, 2: 4, 3: [3, 4], 5: 5, 6: 6}
19761977
>>> ddiff = DeepDiff(t1, t2)
1977-
>>> ddiff
19781978
>>> pprint(ddiff, indent=4)
1979-
{ 'dictionary_item_added': [root[5], root[6]],
1980-
'dictionary_item_removed': [root[4]],
1979+
{ 'dictionary_item_added': ['root[5]', 'root[6]'],
1980+
'dictionary_item_removed': ['root[4]'],
19811981
'iterable_item_added': {'root[3][1]': 4},
19821982
'values_changed': {'root[2]': {'new_value': 4, 'old_value': 2}}}
19831983
>>> ddiff.affected_paths

0 commit comments

Comments
 (0)