Skip to content

Commit

Permalink
Broke up the docstring lines to be max 79 chars
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaelho committed Mar 31, 2017
1 parent 596f6ac commit 2bd0a9c
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions dictdiffer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,11 @@ def patch(diff_result, destination, in_place=False):
:param diff_result: Changes returned by ``diff``.
:param destination: Structure to apply the changes to.
:param in_place: By default, destination dictionary is deep copied before applying the patch, and the copy is returned. Setting ``in_place=True`` means that patch will apply the changes directly to and return the destination structure.
:param in_place: By default, destination dictionary is deep copied
before applying the patch, and the copy is returned.
Setting ``in_place=True`` means that patch will apply
the changes directly to and return the destination
structure.
"""
if not in_place:
destination = deepcopy(destination)
Expand Down Expand Up @@ -349,6 +353,10 @@ def revert(diff_result, destination, in_place=False):
:param diff_result: Changes returned by ``diff``.
:param destination: Structure to apply the changes to.
:param in_place: By default, destination dictionary is deep copied before being reverted, and the copy is returned. Setting ``in_place=True`` means that revert will apply the changes directly to and return the destination structure.
:param in_place: By default, destination dictionary is deep
copied before being reverted, and the copy
is returned. Setting ``in_place=True`` means
that revert will apply the changes directly to
and return the destination structure.
"""
return patch(swap(diff_result), destination, in_place)

0 comments on commit 2bd0a9c

Please sign in to comment.