fix(settings): fixed pyproject loader

closes #469
This commit is contained in:
Christopher Pickering 2022-12-15 11:32:45 -06:00
parent dff02dcdc3
commit 5890161d2c
No known key found for this signature in database
GPG key ID: E14DB3B0A0FACF84

View file

@ -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: