Skip to content

Commit

Permalink
Codemod CLI: Print diff only when there is a change (#945)
Browse files Browse the repository at this point in the history
Otherwise lots of empty lines are printed.
  • Loading branch information
kit1980 authored Jun 7, 2023
1 parent 5eec991 commit 203a2f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libcst/codemod/_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ def _print_parallel_result(
)

# In unified diff mode, the code is a diff we must print.
if unified_diff:
if unified_diff and result.code:
print(result.code)


Expand Down

0 comments on commit 203a2f5

Please sign in to comment.