X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/cc2facaac69a8ffa4486e6fe498842debb17ce12..f825e7ef28c65689e06453d0c3a00310b90cdfdb:/src/black/__init__.py diff --git a/src/black/__init__.py b/src/black/__init__.py index 3d0a2d6..7ce2ac8 100644 --- a/src/black/__init__.py +++ b/src/black/__init__.py @@ -4594,8 +4594,6 @@ def append_leaves(new_line: Line, old_line: Line, leaves: List[Leaf]) -> None: set(@leaves) is a subset of set(@old_line.leaves). """ for old_leaf in leaves: - assert old_leaf in old_line.leaves - new_leaf = Leaf(old_leaf.type, old_leaf.value) replace_child(old_leaf, new_leaf) new_line.append(new_leaf) @@ -5834,7 +5832,7 @@ def find_project_root(srcs: Iterable[str]) -> Path: if not srcs: return Path("/").resolve() - path_srcs = [Path(src).resolve() for src in srcs] + path_srcs = [Path(Path.cwd(), src).resolve() for src in srcs] # A list of lists of parents for each 'src'. 'src' is included as a # "parent" of itself if it is a directory