mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-06 12:06:53 +00:00
Use unified_diff
This commit is contained in:
parent
27cd688c8e
commit
31e740ed05
2 changed files with 18 additions and 16 deletions
|
|
@ -59,7 +59,7 @@ def parse_topkeys(s): # type: (str) -> List[str]
|
|||
def get_diff(source, target): # type: (str, str) -> str
|
||||
source_lines = source.splitlines(True)
|
||||
target_lines = target.splitlines(True)
|
||||
diff = ''.join(difflib.ndiff(source_lines, target_lines))
|
||||
diff = ''.join(difflib.unified_diff(source_lines, target_lines))
|
||||
return diff
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue