From f6dbef2f531efb6b3047dae9d735dbea176db3ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dorian=20P=C3=A9ron?= Date: Tue, 19 Sep 2023 10:09:03 +0200 Subject: [PATCH] fix(configuration): Fix formatting, unused import and forgotten print --- src/djlint/settings.py | 6 ++---- .../test_config_pyproject/test_config_pyproject.py | 2 -- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/djlint/settings.py b/src/djlint/settings.py index 1f3f739b..653ddf56 100644 --- a/src/djlint/settings.py +++ b/src/djlint/settings.py @@ -96,14 +96,13 @@ def find_djlint_rules(root: Path) -> Optional[Path]: def load_pyproject_config(filepath: Path) -> Dict: - """ Load djlint config from pyproject.toml """ + """Load djlint config from pyproject.toml""" data = tomllib.loads(filepath.resolve().read_text(encoding="utf-8")) return data.get("tool", {}).get("djlint", {}) - def load_djlintrc_config(filepath: Path) -> Dict: - """ Load djlint config from .djlintrc """ + """Load djlint config from .djlintrc""" return json.loads(filepath.resolve().read_text(encoding="utf-8")) @@ -128,7 +127,6 @@ def load_project_settings(src: Path, config: Optional[str]) -> Dict: Path(config).resolve(), error, ) - print(djlint_content) pyproject_file = find_pyproject(src) diff --git a/tests/test_config/test_config_pyproject/test_config_pyproject.py b/tests/test_config/test_config_pyproject/test_config_pyproject.py index 185fffe0..b44c2d3c 100644 --- a/tests/test_config/test_config_pyproject/test_config_pyproject.py +++ b/tests/test_config/test_config_pyproject/test_config_pyproject.py @@ -9,8 +9,6 @@ """ -import os - from click.testing import CliRunner from src.djlint import main as djlint