X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/b8450b9faee10f3a0a63378b58adde60a27964e0..519f807f879350704449e424c5c5b7e049e582b3:/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)