mirror of
https://github.com/Hopiu/djLint.git
synced 2026-05-15 00:23:10 +00:00
Ignore invalid indent config
This commit is contained in:
parent
af646f42e0
commit
1c40bf81dc
1 changed files with 11 additions and 1 deletions
|
|
@ -166,7 +166,17 @@ class Config:
|
|||
)
|
||||
|
||||
# base options
|
||||
self.indent: str = (indent or int(djlint_settings.get("indent", 4))) * " "
|
||||
default_indent = 4
|
||||
if not indent:
|
||||
try:
|
||||
indent = int(djlint_settings.get("indent", default_indent))
|
||||
except ValueError:
|
||||
echo(
|
||||
Fore.RED
|
||||
+ f"Error: Invalid pyproject.toml indent value {djlint_settings['indent']}"
|
||||
)
|
||||
indent = default_indent
|
||||
self.indent: str = indent * " "
|
||||
|
||||
default_exclude: str = r"""
|
||||
\.venv
|
||||
|
|
|
|||
Loading…
Reference in a new issue