From 147cb95ff21aaf19694c3127b5813a4df5e25560 Mon Sep 17 00:00:00 2001 From: Steve Holland Date: Mon, 17 Sep 2018 11:45:05 -0500 Subject: [PATCH] Fix indentation when inserting multiple indented lines, per https://github.com/PyCQA/redbaron/issues/150 --- redbaron/base_nodes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redbaron/base_nodes.py b/redbaron/base_nodes.py index f681a9bc..88feba80 100644 --- a/redbaron/base_nodes.py +++ b/redbaron/base_nodes.py @@ -1789,7 +1789,7 @@ def modify_last_indentation(node, indentation): expected_list.append(i[0]) log("-- current result: %s", ["".join(map(lambda x: x.dumps(), expected_list))]) - if previous and previous.type == "endl" and i[0].type != "endl" and previous.indentation != indentation: + if previous and previous.type == "endl" and i[0].type != "endl" and previous.indent != indentation: log("Previous is endl and current isn't endl and identation isn't correct, fix it") previous.indent = indentation