Repository navigation
chore(deps): update dependency djlint to v1.49.10 - #392
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
renovate
Bot
force-pushed
the
renovate/djlint-1.x
branch
from
November 16, 2026 00:32
4a2d46b to
9bddbd3
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
1.46.6→1.49.10Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
Release Notes
djlint/djLint (djlint)
v1.49.10Compare Source
Packaging
py.typedmarker, so type checkers read the annotations ofdjlint.api.djlint.apino longer builds the command line, which takes a little off the start of editors and other programs that use djLint from Python. The command line moved out of thedjlintpackage itself, which still hands outmain,processandprocess_stdinwhen they are asked for.v1.49.9Compare Source
Bug fixes
{% set %}that is not JSON, as in a string passed to{{ url("…", x) }}, is kept as written. It was rewritten as a line break, which changed the string.kind, as in<track kind="">or<track kind>. Browsers read an emptykindasmetadata, not subtitles, so such a track carries no captions. H057 took it for a subtitles track.djlint.toml,.djlintrcor the file--configurationnames. It always saidpyproject.toml.v1.49.8Compare Source
Feature
makoprofile for Mako templates. Mako needs a control line, such as% if x:or% endfor, and a##comment to start a line of their own, and other profiles joined them onto other lines, which broke the template. Under themakoprofile they always keep their own lines, and the lines between% ifand% endif, or between a<%block>or<%def>tag and its closing tag, are indented like any other block. The code in a${}expression is left as written, and so are the attributes of a tag that depend on control lines, Python blocks,<%doc>and<%text>, and a script or style holding Mako syntax under--format-jsor--format-css. The linter runs the HTML rules. Theallprofile handles Mako's lines the same way.{% apply %},{% sandbox %}and{% guard %}blocks and Django's old{% ifequal %}and{% ifnotequal %}blocks indent their contents like other blocks.Bug fixes
max_line_length = [100]or"indent": null, is reported and falls back to its default, as a string that is no number already did. djLint failed instead.{% endtoc %}, or a stray{% endif %}, stays at the level of the markup around it. It moved one level to the left, and so did everything after it.{{ _("Hello " "world") }}or{% set x = "a" "b" %}, or in triple quotes, keeps its quotes. They were dropped, which left{{ _(Hello world) }}, a variable name rather than a string.Performance
${that never close no longer slows formatting down. Three thousand of them in one paragraph took ten seconds and now take a tenth of one.v1.49.7Compare Source
Feature
max_blank_linestogether withpreserve_blank_lines, which takes precedence, and--prefer-configurationwithout--configuration. The warning goes to stderr once per run, so the language server does not repeat it on every change.Bug fixes
>, as in</pat the end of a line, again runs to the next>, as browsers read it. Since 1.49.5, the tag on the next line was taken for an opening tag, so each paragraph after such a line was indented one level deeper than the one before.v1.49.6Compare Source
Docs
djlint --helpgroups the options by what they are for: modes, files, configuration, the linter, output, layout, rewrites, and CSS and JavaScript. They used to come in one long list in no particular order.v1.49.5Compare Source
Performance
<p data-x="atook 40 seconds, 1,500 lines of<ptook over a minute, and 2,000 ran out of memory. Thousands of<script>,<style>or<textarea>tags that are never closed no longer slow down formatting or linting either: linting 4,000 of them took up to 23 seconds.Bug fixes
--format-jsleaves a<script>alone when itstypeis neither JavaScript nor JSON, such as a client-side template in<script type="text/template">. It was formatted as JavaScript, which broke the template. Scripts without atype, modules,text/babeland JSON types such asapplication/ld+jsonare formatted as before.<script>or<style>tag with attributes too long for one line has them spread over lines also when its contents take several lines, as any other tag does. With--format-jsor--format-css, one run spread them and the next joined them again.--format-jsor--format-css, the contents of a script or style that follows other markup on its line, as in<span>a</span><script>, are indented below that line. After</noscript><script>, the next run indented the rest of the file one level deeper.--format-js, JavaScript that js-beautify lays out differently on each run, such as a ternary written over several lines, settles on one layout, so a second run leaves it alone.--format-cssno longer takes a<styleinside a JavaScript string, as innew RegExp("<style(.*?)>"), for a style tag. It formatted the rest of the script as CSS.--format-jsand--format-cssno longer read a<script>or<style>written inside an HTML comment, as in<!-- <script> -->, as the start of a block. Everything from it to the next real closing tag was formatted as JavaScript or CSS.Docs
djlint --helpdescribes each option more clearly. It now gives the defaults that come from.editorconfig, lists theallprofile, and names what a value holds, such as--ignore CODES.--warnno longer claims to turn errors into warnings: it only changes the exit code. The configuration page uses the same wording.--max-blank-linessay that it has no effect with--preserve-blank-lines, which keeps every blank line.v1.49.4Compare Source
Performance
{{,{% set %}or{% include %}left unclosed, as in{{ 'aon every line, formats in well under a second. Four hundred such lines took from 45 seconds to seven minutes. Linting such lines withT002no longer slows down the same way.<script {%a%}{%a%}…>, formats and lints in well under a second. It took tens of seconds.Bug fixes
djlint --checkpasses right afterdjlint --reformat.--max-line-length, its indentation and any text beside it included. A line that fit only without its indentation was joined, and the next run spread its attributes.--max-attribute-lengthonce astyleorsrcsetvalue loses its trailing;or extra spaces stays on one line. It was spread, and the next run joined it again.{% blocktrans trimmed %}inside a{% filter %}no longer ends the filter early. Everything after it lost its indentation, and the next run indented the{% endfilter %}again.<script>or<style>written across lines, whose attributes are longer than--max-attribute-length, has them spread when it is put on one line. It took a second run.{{ }},{% %}or mako${ }that spans lines, as inHTML('<a class="x" href="y">')on a line of its own, no longer has its attributes spread over several lines. That put line breaks into the string, which in mako is an error, and the next run moved them again.value="{{ _("Students' list") }}"or mako'svalue="${_("Students' list")}", no longer upsets the layout of the lines that follow. The quote was read as the end of the value and the apostrophe as the start of another.<button "="" title="x">orid="a"", no longer stops djLint from reading the tags after it. Only a quote after=opens a value, as browsers read it. Before, the rest of the file was skipped: the linter reported its elements as orphans (H025) and the formatter indented them differently on each run. A quote inside a bare value, as intitle=a'b, is part of the value for the same reason.>in a string of a template tag inside an attribute value, as indata-x="{{ "a > b" }}", no longer ends the tag. The formatter took out the space beside it, which changed the string.class="{{ "a b" }}", closed up"a = b", joined a line break in a string in astyleorsrcset, split astyleat a;or asrcsetat a,inside a template tag, and with--format-jsor--format-csstook a>in one for the end of the<script>or<style>tag.--max-line-length, as the rule for long lines intends. A lonestylewas split at each;, and the next run could join it again.styleorsrcsetattribute that has no value no longer stops the formatter with an error when its attributes are spread over several lines.type="text/javascript"ortype="text/css"is dropped, and a form'smethodlowercased, also when the value is written without quotes or with spaces around=. It used to take a second run.{{, with}}on a line of its own, stays where it was written. It used to be pulled up onto the{{line with its arguments a level too deep, which the next run corrected.{% set %}or{% trans %}, is kept, also when the string holds a%},{%,}}or{{, or a comment before it holds a quote. It was stripped or replaced with indentation, which changed the string.{% if x %}followed by{{ _('Deleted') }}on its own line. It used to be put on one line.typeonly where it is the element's default:text/javascripton a<script>, andtext/csson a<style>or a<link rel="stylesheet">. A<script type="text/css">, a<style type="text/javascript">, a custom element such as<script-x>, and a<link>that is not a stylesheet keep theirs, as does a<link>whoserela template tag helps write or comes after one (arelinside a{# #}comment does not count). So does an attribute with a longer name, such as@typeor@method. Atypeormethodnext to a template tag written with-, as in{{- x }}, is left as written, since dropping the type would join what the-trims.H024reports the same cases, also when the value is written without quotes or with spaces around=.typeis kept when the browser might not read it: when anothertypefollows in the same tag, as in<script type="text/javascript" type="module">, since a browser reads the first one, and when a template tag that may write atypeof its own follows, as in<script type="text/javascript" {{ attrs }}>. A template tag that is part of a value, as insrc={{ url }}ordata-x="{{ "a > b" }}", does not count, and neither does text inside a string of a template tag, as in{{ '}} type=text/javascript' }}. A defaulttypewritten twice, as intype="text/javascript" type=text/javascript, is dropped both times in one run.<div class="x" {# note #}>, is kept. With a profile that has{# #}comments, the formatter deleted it.-, as inclass=x {{- suffix }}orclass={{ c -}} x, stays unquoted. The-joins the text beyond it onto the value, and quoting the value left that text outside, which changed the attribute.<option value="x"{% if a %} selected{% endif %}>or<li{{ attrs }}>, stays there when the attributes are spread over several lines. A line break or space was put between them, which the page then rendered.H056no longer reads asrcwritten inside a template tag, as in<img {% if src %}class="a"{% endif %} src="a.png">, as an emptysrcof the tag.v1.49.3Compare Source
Bug fixes
{% set %}written across lines indents the arguments of a function call inside it, as it already did for the items of a list or dict (#2819). Its last line stays at the level of the value when it holds part of the value, the lines after the tag are no longer one level too shallow when a bracket opened inside it closes on its last line, a bracket inside a quoted string no longer changes the indentation, and a line that goes on with a string started on the line before is no longer indented, which put spaces into the string.v1.49.2Compare Source
Performance
--use-gitignore."=""can leave in a template, no longer takes minutes to format.v1.49.1Compare Source
Packaging
py.typedmarker, so type checkers read the annotations ofdjlint.api.djlint.apino longer builds the command line, which takes a little off the start of editors and other programs that use djLint from Python. The command line moved out of thedjlintpackage itself, which still hands outmain,processandprocess_stdinwhen they are asked for.v1.49.0Compare Source
Features
djlint --lspruns a language server, for findings as you type and formatting in any editor that supports LSP. See Language server.djlint.api.is_excluded()tells whether the configuration leaves out a file.Bug fixes
--stdin-filename, djLint formats the text it is given even if the configuration setsfiles. It formatted those files instead, so an editor formatting a template rewrote them and left the template as it was.--stdin-filenamehonorsexclude,extend-excludeand--use-gitignore: the text of an excluded file comes back unchanged, with no findings.v1.48.1Compare Source
Performance
$before a tag no longer makes linting slow: a line of two hundred thousand of them went from 2.2 seconds to 0.15. Formatting such a line is still slow.v1.48.0Compare Source
Feature
djlint.api, a supported way to format and lint text from Python:load_config(),format_text()andlint_text(), which returns findings with numeric positions. See Python API.--linter-output-formattakes{end}, SARIF reportsendLineandendColumn, and GitHub annotations cover the whole finding. A custom rule'spython_modulecan returnend, and otherwise ends where itsmatchdoes.python_moduleis also looked for in the project root, after everything else on the path, so it works with thedjlintcommand as well as withpython -m djlint.Changed
python_modulerule that returns alinethat isn't a position now stops djLint with an error naming the rule, instead of a traceback from the report.Fix
<li><a …>orRead the <a …>, is laid out from that line. The attributes line up under the first one, or with--single-attribute-per-linesit one indent in from the line with the closing>at the line's indent. They used to be indented as if the tag started the line, so they landed left of the tag, or a single space in after text.v1.47.1Compare Source
Fix
preserve-inlinein thejssettingbrace_styletakes effect, so{ bubbles: true }stays on one line in a<script>or in an attribute formatted with--format-attribute-js-json. It used to be dropped before the code was formatted.cssandjs, so a strict validator such as Tombi no longer reportsindent_sizethere.v1.47.0Compare Source
Feature
--sort-load-tags/sort_load_tagssorts the libraries in a{% load %}tag and drops the ones written twice, so{% load static i18n %}becomes{% load i18n static %}. In{% load a b from library %}the names beforefromare sorted. It is off by default: where two libraries define a tag or filter of the same name, the one loaded last wins, so sorting can change which one a template uses.H012reports around an attribute's=, so<div class = "a">becomes<div class="a">.Changed
H010reports the names the formatter lowercases, in any mix of case, soWidth="3"is now reported. A framework binding such as:itemIDor@IDand a longer name such asdata-IDno longer are, since the formatter leaves their case alone.H018is not reported under--close-void-tags, since the formatter then writes the/>ending the rule reports.--ignore-casealready worked this way forH009andH010.Fix
H020reports an empty pair whose end tag has whitespace before its>, such as<div></div\n>.H026reports aclassoridholding only whitespace, such asclass=" ", and one written with spaces around the=.H033reports an action padded at both ends once. It used to report it twice, unless an attribute beforeactionhappened to make the two reports look the same.<p title="<img src='a'>">, is text, andH005,H008,H010,H012,D018,J018,H024,H026,H029andH033no longer report it.H046andH051readtabindexandrolefrom the tag's own attributes, sotabindex=1written in a value or in the page text is not reported either.T001andT027read a tag holding a dict, such as{{ f({"a": {"b": 1}}) }}, up to the}}that closes it rather than the first}}inside it.T032steps over an escaped quote in a string, so the spaces in{{ x|default:"a \"b c\"" }}are not reported.H015reports a heading followed by a tag on the same line anywhere in the file. It used to look only at the last line.{{{attrs}}}and a dict as in{{ {'class': 'x'}|xmlattr }}, so<img {{ attrs }} src='a'>is reported byH008, which used to stop reading at the{{.T038steps over a string in a block tag, so the{%in{% with a="{%" %}does not cut the tag short.Performance
<, andH015,H030,H036,T001,T027,T038andT039no longer read the rest of the document again for each tag. A file holding thousands of unclosed tags or headings on one line is linted in a fraction of a second, where it used to take minutes.Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.