X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/117891878e5be4d6b771ae5de299e51b679cea27..ea4c772746d787a93a0f19ce3cbabfacd8094205:/src/black/files.py?ds=sidebyside 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()}