X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/b8450b9faee10f3a0a63378b58adde60a27964e0..33e2b4401439f2015065704c08d22f008f016235:/src/black/files.py diff --git a/src/black/files.py b/src/black/files.py index a0c92e8..de51615 100644 --- a/src/black/files.py +++ b/src/black/files.py @@ -118,7 +118,7 @@ def get_gitignore(root: Path) -> PathSpec: gitignore = root / ".gitignore" lines: List[str] = [] if gitignore.is_file(): - with gitignore.open() as gf: + with gitignore.open(encoding="utf-8") as gf: lines = gf.readlines() return PathSpec.from_lines("gitwildmatch", lines)