From 01e8a5145160620140c3c57d285ccb2cfe067540 Mon Sep 17 00:00:00 2001 From: Pham Huy Hoang Date: Thu, 16 Mar 2023 19:04:17 +0900 Subject: feat(python): add "return" patterns to @indent_end `return ...` is usually the last line of a function/statement, so mark some possible patterns of `return` with `@indent_end` to dedent the line after it --- tests/indent/python_spec.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/indent/python_spec.lua') diff --git a/tests/indent/python_spec.lua b/tests/indent/python_spec.lua index 6b417a37f..c400de542 100644 --- a/tests/indent/python_spec.lua +++ b/tests/indent/python_spec.lua @@ -74,5 +74,9 @@ describe("indent Python:", function() run:new_line("line_after_indent.py", { on_line = 49, text = "x", indent = 0 }) run:new_line("line_after_indent.py", { on_line = 55, text = "x", indent = 4 }) run:new_line("line_after_indent.py", { on_line = 63, text = "x", indent = 4 }) + + for _, line in ipairs { 2, 5, 8, 11, 16 } do + run:new_line("return_dedent.py", { on_line = line, text = "x", indent = 0 }) + end end) end) -- cgit v1.2.3-70-g09d2