X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/4b449e7471c31ae2d3a890510322c40594cacc8f..9ef8e6c9b0090d787953bcd3c46a8942483fcc6b:/black.py?ds=sidebyside diff --git a/black.py b/black.py index 1c35643..11db7e4 100644 --- a/black.py +++ b/black.py @@ -3597,7 +3597,7 @@ def find_project_root(srcs: Iterable[str]) -> Path: # Append a fake file so `parents` below returns `common_base_dir`, too. common_base /= "fake-file" for directory in common_base.parents: - if (directory / ".git").is_dir(): + if (directory / ".git").exists(): return directory if (directory / ".hg").is_dir():