formatter.py: fix newlines being indented a space too much

This commit is contained in:
gregorni 2023-07-27 15:48:39 +02:00
parent 1933529f09
commit 9a77b51dce

View file

@ -43,7 +43,11 @@ class Format:
if str(item) in newline_after + closing_tokens + opening_tokens:
tokenized_str += "\n"
tokenized_str += indent_levels * " "
else:
tokenized_str += " "
if tokenized_str == tokenized_str.strip():
tokenized_str += " "
print(tokenized_str)
return tokenized_str