Commit 75d2af2e authored by Łukasz Langa's avatar Łukasz Langa
Browse files

Fix missing leading slash due to `relative_to()` resolution

parent 4c352ad4
Loading
Loading
Loading
Loading
+1 −1
Changes for black.py: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -2826,7 +2826,7 @@ def gen_python_files_in_dir(
    """
    assert root.is_absolute(), f"INTERNAL ERROR: `root` must be absolute but is {root}"
    for child in path.iterdir():
        normalized_path = child.resolve().relative_to(root).as_posix()
        normalized_path = "/" + child.resolve().relative_to(root).as_posix()
        if child.is_dir():
            normalized_path += "/"
        exclude_match = exclude.search(normalized_path)