X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/f3599b22d4761558032b240605f1f37ee910ba10..fcf97961061982656a1384ecc1628e217a52a88c:/src/black/__init__.py?ds=inline diff --git a/src/black/__init__.py b/src/black/__init__.py index a7e89cc..886d9c2 100644 --- a/src/black/__init__.py +++ b/src/black/__init__.py @@ -281,7 +281,12 @@ def parse_pyproject_toml(path_config: str) -> Dict[str, Any]: """ pyproject_toml = toml.load(path_config) config = pyproject_toml.get("tool", {}).get("black", {}) - return {k.replace("--", "").replace("-", "_"): v for k, v in config.items()} + return { + k.replace("--", "").replace("-", "_"): str(v) + if not isinstance(v, (list, dict)) + else v + for k, v in config.items() + } def read_pyproject_toml(