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