django-no-multiline-template-comment
django-no-multiline-template-comment rejects multi-line Django {# … #} template
comments.
Why
Django's {# #} comment is single-line only. A {# whose closing #} is on a
later line does not comment the following lines — they render as visible text on the
page. Use {% comment %}…{% endcomment %} for anything that may wrap. This hook catches
the mistake in CI.
{# ✗ broken: this comment
spans two lines, so everything here leaks onto the page as text #}
{# ✓ fixed: single-line comment #}
{% comment %}
...or {% comment %} for anything that may wrap.
{% endcomment %}
Installation
- repo: https://github.com/Pierre-Sassoulas/django-no-multiline-template-comment/
rev: v0.0.2
hooks:
- id: django-no-multiline-template-comment
Autofix
Pass --fix to rewrite offending comments to {% comment %}…{% endcomment %} in place
(valid single-line comments and unterminated {# are left untouched). As with other
fixer hooks, a rewritten file fails the run so you review and re-stage it.
- repo: https://github.com/Pierre-Sassoulas/django-no-multiline-template-comment/
rev: v0.0.2
hooks:
- id: django-no-multiline-template-comment
args: [--fix]
Metadata
Release files for django-no-multiline-template-comment 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| django_no_multiline_template_comment-0.0.2.tar.gz | 5.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_no_multiline_template_comment-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.5 kB
Release files / django_no_multiline_template_comment-0.0.2.tar.gz
| Download URL | django_no_multiline_template_comment-0.0.2.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
720ed008161da33f0e1e3b3e73df5fe05e594dc250df4000eb24552ecdd0ef7b
|
|
BLAKE2b-256 checksum How to use checksums |
3b5bc3523914dfdeb6d0204b53fff0e60a89534c61fc7583a39b8d970a96ff4a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / django_no_multiline_template_comment-0.0.2-py3-none-any.whl
| Download URL | django_no_multiline_template_comment-0.0.2-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c13b6bbac5b77a87d119f5324a21f920fcd8c6f9b1bcb61b0c45c4f6a1d8cc98
|
|
BLAKE2b-256 checksum How to use checksums |
8f8ea975846b0153cebd61f51a02be5e179aa68cee65d0a66b1b57e64d26d0bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Security for django-no-multiline-template-comment 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.