From 5890161d2c5485d5f3c346d2eb2ad65e506cd5d5 Mon Sep 17 00:00:00 2001 From: Christopher Pickering Date: Thu, 15 Dec 2022 11:32:45 -0600 Subject: [PATCH] fix(settings): fixed pyproject loader closes #469 --- src/djlint/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/djlint/settings.py b/src/djlint/settings.py index be456f3c..92e133a0 100644 --- a/src/djlint/settings.py +++ b/src/djlint/settings.py @@ -116,7 +116,7 @@ def load_project_settings(src: Path, config: Optional[str]) -> Dict: pyproject_file = find_pyproject(src) if pyproject_file: - content = tomllib.load(pyproject_file.open("rb")) + content = tomllib.loads(pyproject_file.read_text(encoding="utf8")) try: return {**djlint_content, **content["tool"]["djlint"]} # type: ignore except KeyError: