Skip to content

Commit

Permalink
fix(configuration): Fix formatting, unused import and forgotten print
Browse files Browse the repository at this point in the history
  • Loading branch information
RenjiSann committed Sep 19, 2023
1 parent cfcbafc commit f6dbef2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 2 additions & 4 deletions src/djlint/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"))


Expand All @@ -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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
"""

import os

from click.testing import CliRunner

from src.djlint import main as djlint
Expand Down

0 comments on commit f6dbef2

Please sign in to comment.