diff --git a/docs/src/docs/linter.md b/docs/src/docs/linter.md index 2fe447e..f2666bb 100644 --- a/docs/src/docs/linter.md +++ b/docs/src/docs/linter.md @@ -76,6 +76,7 @@ A good rule follows this pattern: | H031 | Consider adding meta keywords. | | T032 | Extra whitespace found in template tags. | | H033 | Extra whitespace found in form action. | +| T034 | Did you intend to use {% ... %} instead of {% ... }%? | ### Adding Rules diff --git a/docs/src/fr/docs/linter.md b/docs/src/fr/docs/linter.md index 8a9f19f..750fb83 100644 --- a/docs/src/fr/docs/linter.md +++ b/docs/src/fr/docs/linter.md @@ -76,6 +76,7 @@ Une bonne règle suit ce modèle : | H031 | Pensez à ajouter des méta keywords. | | T032 | Espace blanc supplémentaire trouvé dans les balises du modèle. | | H033 | Espace supplémentaire dans l'action du formulaire. | +| T034 | Aviez-vous l'intention d'utiliser {% ... %} au lieu de {% ... }% ? | ### Ajout de règles diff --git a/docs/src/ru/docs/linter.md b/docs/src/ru/docs/linter.md index 175c9fc..c90a841 100644 --- a/docs/src/ru/docs/linter.md +++ b/docs/src/ru/docs/linter.md @@ -76,6 +76,7 @@ djlint /path/to/this.html.j2 --profile=jinja | H031 | Рассмотрите возможность добавления мета-ключевых слов. | | T032 | В тегах шаблона обнаружены лишние пробелы. | | H033 | В действии формы обнаружен лишний пробел. | +| T034 | Вы намеревались использовать {% ... %} вместо {% ... }%? | ### Добавление правил diff --git a/requirements.txt b/requirements.txt index 7fcc4dd..8af618a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -18,7 +18,7 @@ iniconfig==1.1.1; python_version >= "3.7" isort==5.10.1; python_full_version >= "3.6.1" and python_version < "4.0" jsbeautifier==1.14.6 lazy-object-proxy==1.7.1; python_version >= "3.6" and python_full_version >= "3.7.2" -mccabe==0.7.0; python_full_version >= "3.7.2" and python_version >= "3.7" +mccabe==0.6.1; python_full_version >= "3.7.2" and python_version >= "3.7" mypy-extensions==0.4.3; python_full_version >= "3.6.2" and python_version >= "3.6" mypy==0.971; python_version >= "3.6" packaging==21.3; python_version >= "3.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.7" @@ -27,8 +27,8 @@ pep8-naming==0.13.2; python_version >= "3.7" platformdirs==2.5.2; python_version >= "3.7" and python_full_version >= "3.7.2" and (python_version >= "3.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.7") pluggy==1.0.0; python_version >= "3.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.7" py==1.11.0; python_version >= "3.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.7" -pycodestyle==2.9.1; python_version >= "3.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.7" -pyflakes==2.5.0; python_version >= "3.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.7" +pycodestyle==2.7.0; python_version >= "3.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.7" +pyflakes==2.3.1; python_version >= "3.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.7" pylint==2.15.2; python_full_version >= "3.7.2" pyparsing==3.0.9; python_full_version >= "3.6.8" and python_version >= "3.7" pytest-cov==3.0.0; python_version >= "3.6" diff --git a/src/djlint/rules.yaml b/src/djlint/rules.yaml index 884d8d7..3b1fffd 100644 --- a/src/djlint/rules.yaml +++ b/src/djlint/rules.yaml @@ -251,3 +251,9 @@ patterns: -