aboutsummaryrefslogtreecommitdiffstats
path: root/tests/indent/python
diff options
context:
space:
mode:
authorPham Huy Hoang <hoangtun0810@gmail.com>2023-03-16 19:04:17 +0900
committerStephan Seitz <stephan.seitz@fau.de>2023-03-16 13:41:19 +0100
commit01e8a5145160620140c3c57d285ccb2cfe067540 (patch)
tree5c0e6f5c17c8f57935d325ae8132acbc466ad591 /tests/indent/python
parentfix(windows): treat any non-cmd shell as powershell like in selector (diff)
downloadnvim-treesitter-01e8a5145160620140c3c57d285ccb2cfe067540.tar
nvim-treesitter-01e8a5145160620140c3c57d285ccb2cfe067540.tar.gz
nvim-treesitter-01e8a5145160620140c3c57d285ccb2cfe067540.tar.bz2
nvim-treesitter-01e8a5145160620140c3c57d285ccb2cfe067540.tar.lz
nvim-treesitter-01e8a5145160620140c3c57d285ccb2cfe067540.tar.xz
nvim-treesitter-01e8a5145160620140c3c57d285ccb2cfe067540.tar.zst
nvim-treesitter-01e8a5145160620140c3c57d285ccb2cfe067540.zip
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
Diffstat (limited to 'tests/indent/python')
-rw-r--r--tests/indent/python/return_dedent.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/indent/python/return_dedent.py b/tests/indent/python/return_dedent.py
new file mode 100644
index 000000000..44d6219de
--- /dev/null
+++ b/tests/indent/python/return_dedent.py
@@ -0,0 +1,16 @@
+def a():
+ return
+
+def a():
+ return True
+
+def a():
+ return (1, 2, 3)
+
+def a():
+ return x.y.z
+
+def a():
+ return (
+ 1, 2, 3
+ )