djLint is an Askama template linter and an Askama template formatter! Take advantage of the pre-build profile when linting and formatting your templates with djLint.
djlint /path/to/templates --profile=askama
Configure djLint in your projects pyproject.toml.
[tool.djlint]
profile="askama"