Commit 06e95b1e authored by Łukasz Langa's avatar Łukasz Langa
Browse files

Show full path on diffs

Fixes #130
parent 2e52a2b3
Loading
Loading
Loading
Loading
+2 −0
Changes for README.md: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -518,6 +518,8 @@ More details can be found in [CONTRIBUTING](CONTRIBUTING.md).
* generalized star expression handling, including double stars; this
  fixes multiplication making expressions "unsafe" for trailing commas (#132)

* fixed `--diff` not showing entire path (#130)

* fixed parsing of complex expressions after star and double stars in
  function parameters (#2)

+2 −2
Changes for black.py: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -341,8 +341,8 @@ def format_file_in_place(
        with open(src, "w", encoding=src_buffer.encoding) as f:
            f.write(dst_contents)
    elif write_back == write_back.DIFF:
        src_name = f"{src.name}  (original)"
        dst_name = f"{src.name}  (formatted)"
        src_name = f"{src}  (original)"
        dst_name = f"{src}  (formatted)"
        diff_contents = diff(src_contents, dst_contents, src_name, dst_name)
        if lock:
            lock.acquire()
+1 −1
Changes for tests/test_black.py: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -200,7 +200,7 @@ def test_expression_diff(self) -> None:
            self.assertTrue(ff(tmp_file, write_back=black.WriteBack.DIFF))
            sys.stdout.seek(0)
            actual = sys.stdout.read()
            actual = actual.replace(tmp_file.name, "<stdin>")
            actual = actual.replace(str(tmp_file), "<stdin>")
        finally:
            sys.stdout = hold_stdout
            os.unlink(tmp_file)