From dbcc094fc156629b798db27074b40cb9b718d9d9 Mon Sep 17 00:00:00 2001 From: gregorni Date: Thu, 28 Sep 2023 17:54:18 +0200 Subject: [PATCH] formatter.py: Remove `another_newline()` --- blueprintcompiler/formatter.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/blueprintcompiler/formatter.py b/blueprintcompiler/formatter.py index 52ee2cb..7106261 100644 --- a/blueprintcompiler/formatter.py +++ b/blueprintcompiler/formatter.py @@ -127,14 +127,16 @@ class Format: prev_line_type in [LineType.CHILD_TYPE, LineType.COMMENT] or prev_line_type == LineType.BLOCK_OPEN ): - end_str = ( - end_str.strip() - + "\n\n" - + (indent_item * (indent_levels - 1)) + # end_str = ( + # end_str.strip() + # + "\n\n" + # + (indent_item * (indent_levels - 1)) + # ) + commit_current_line(LineType.BLOCK_OPEN, True, 2) + else: + commit_current_line( + LineType.BLOCK_OPEN, ) - commit_current_line( - LineType.BLOCK_OPEN, - ) elif str_item == "]" and is_child_type: commit_current_line(