Skip to content

Commit 7c31749

Browse files
committed
fixup to follow convention
1 parent 0e9b070 commit 7c31749

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Lib/difflib.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,9 +1162,7 @@ def unified_diff(a, b, fromfile='', tofile='', fromfiledate='',
11621162
file1_range = _format_range_unified(first[1], last[2])
11631163
file2_range = _format_range_unified(first[3], last[4])
11641164
_line = '@@ -{} +{} @@{}'.format(file1_range, file2_range, lineterm)
1165-
if color:
1166-
_line = colors["hunk"] + _line + reset
1167-
yield _line
1165+
yield colors["hunk"] + _line + reset if color else _line
11681166

11691167
for tag, i1, i2, j1, j2 in group:
11701168
if tag == 'equal':

0 commit comments

Comments
 (0)