X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/117891878e5be4d6b771ae5de299e51b679cea27..7c94ed61a55f8ae0c60737cbc6cfee3b5066ce11:/src/black/files.py diff --git a/src/black/files.py b/src/black/files.py index 560aa05..dfab9f7 100644 --- a/src/black/files.py +++ b/src/black/files.py @@ -95,8 +95,8 @@ def parse_pyproject_toml(path_config: str) -> Dict[str, Any]: If parsing fails, will raise a tomli.TOMLDecodeError """ - with open(path_config, encoding="utf8") as f: - pyproject_toml = tomli.loads(f.read()) + with open(path_config, "rb") as f: + pyproject_toml = tomli.load(f) config = pyproject_toml.get("tool", {}).get("black", {}) return {k.replace("--", "").replace("-", "_"): v for k, v in config.items()}