Skip to content

Commit 97f9204

Browse files
committed
Construct short description directly
1 parent 0e225f5 commit 97f9204

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

diff/diff.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,8 @@ def _report(self, left_right_files: Iterable[tuple[Path, None] | tuple[Path, Pat
248248
if not left_file or right_file and from_stat.st_mode != to_stat.st_mode:
249249
short_desc.append(f"{to_stat.st_mode:o}")
250250
short_desc.append(to_desc)
251-
short_desc = " ".join(short_desc)
252251
writer.write(b' <details open style="margin-bottom:1cm;"><summary><code>')
253-
writer.write(f"{pos}/{left_right_files_len}{short_desc}".encode())
252+
writer.write(str.encode(f"{pos}/{left_right_files_len}" + " ".join(short_desc)))
254253
if left_file in self._renamed_only_mapping or (
255254
left_file and right_file and left_file.read_bytes() == right_file.read_bytes()
256255
):

0 commit comments

Comments
 (0)