From 5392565580cb71bd94a188b9345c2a8af67e081d Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Fri, 29 Oct 2021 19:49:30 +0800 Subject: [PATCH 1/4] settings.py: Fix docstring spelling --- src/djlint/settings.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/djlint/settings.py b/src/djlint/settings.py index 458e324..a573fcc 100644 --- a/src/djlint/settings.py +++ b/src/djlint/settings.py @@ -37,7 +37,7 @@ def find_project_root(src: Path) -> Path: def load_gitignore(root: Path) -> PathSpec: - """Search upstream for a pyprojec.toml file.""" + """Search upstream for a .gitignore file.""" gitignore = root / ".gitignore" git_lines: List[str] = [] @@ -54,7 +54,7 @@ def load_gitignore(root: Path) -> PathSpec: def find_pyproject(root: Path) -> Optional[Path]: - """Search upstream for a pyprojec.toml file.""" + """Search upstream for a pyproject.toml file.""" pyproject = root / "pyproject.toml" @@ -138,7 +138,7 @@ def build_custom_blocks(custom_blocks: Union[str, None]) -> Optional[str]: class Config: - """Djling Config.""" + """Djlint Config.""" def __init__( self, From 375c3f9ec4ee1b5b24c58abd0767358a97921711 Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Fri, 29 Oct 2021 19:49:54 +0800 Subject: [PATCH 2/4] tests(gitignore): Fix test The gitignore loader was not loading the generated .gitignore because it only looks for it in the project root. --- tests/test_config_gitignore.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_config_gitignore.py b/tests/test_config_gitignore.py index b567b44..71d1939 100644 --- a/tests/test_config_gitignore.py +++ b/tests/test_config_gitignore.py @@ -27,6 +27,9 @@ def test_cli(runner: CliRunner) -> None: with open("tests/config_gitignore/.gitignore", "w") as git: git.write("html_two.html") + with open("tests/config_gitignore/pyproject.toml", "w") as f: + f.write("") + result = runner.invoke( djlint, ["tests/config_gitignore/html_two.html", "--check", "--use-gitignore"] ) From 927a2ccc5be053fb45fe9ac3e9183a3eac8a42b1 Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Fri, 29 Oct 2021 20:44:11 +0800 Subject: [PATCH 3/4] Add Python 3.10 testing --- .github/workflows/test.yml | 2 +- tox.ini | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 477bcc9..9b9f479 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,7 +9,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: [3.7, 3.8, 3.9] + python-version: [3.7, 3.8, 3.9, '3.10'] fail-fast: true steps: diff --git a/tox.ini b/tox.ini index c6b5cf4..0d5f86c 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = test +envlist = py3{7,8,9,10}-test skip_missing_interpreters = True isolated_build = True @@ -47,13 +47,13 @@ commands = ; check-manifest -v skip_install: true -[testenv:test] +[testenv] deps = pytest pytest-cov coverage commands = - pytest --cov=src/djlint --cov-branch --cov-report xml:coverage.xml --cov-report term-missing + pytest --cov=src/djlint --cov-branch --cov-report xml:coverage.xml --cov-report term-missing {posargs:} skip_install: false [testenv:docs] From ca04184a523818c644e81a5188a0c97aee2487b0 Mon Sep 17 00:00:00 2001 From: Christopher Pickering Date: Tue, 2 Nov 2021 08:45:46 +0100 Subject: [PATCH 4/4] removed blank toml file --- tests/test_config_gitignore.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/test_config_gitignore.py b/tests/test_config_gitignore.py index 71d1939..b567b44 100644 --- a/tests/test_config_gitignore.py +++ b/tests/test_config_gitignore.py @@ -27,9 +27,6 @@ def test_cli(runner: CliRunner) -> None: with open("tests/config_gitignore/.gitignore", "w") as git: git.write("html_two.html") - with open("tests/config_gitignore/pyproject.toml", "w") as f: - f.write("") - result = runner.invoke( djlint, ["tests/config_gitignore/html_two.html", "--check", "--use-gitignore"] )