Skip to content

Commit

Permalink
Transform empty diff condition to a lazy one
Browse files Browse the repository at this point in the history
  • Loading branch information
zacikpa committed Jul 20, 2023
1 parent fbbbe44 commit 7ae0105
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions diffkemp/diffkemp.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,8 +497,9 @@ def text_indent(text, width):
old_dir_abs_path = os.path.join(os.path.abspath(snapshot_dir_old), "")
new_dir_abs_path = os.path.join(os.path.abspath(snapshot_dir_new), "")

any_diff = any([x.diff for x in fun_result.inner.values()])
if fun_result.kind == Result.Kind.NOT_EQUAL or (full_diff and any_diff):
if fun_result.kind == Result.Kind.NOT_EQUAL or (
full_diff and any([x.diff for x in fun_result.inner.values()])
):
if output_dir:
output = open(os.path.join(output_dir, "{}.diff".format(fun)), "w")
output.write(
Expand Down

0 comments on commit 7ae0105

Please sign in to comment.