aboutsummaryrefslogtreecommitdiffstats
path: root/queries/python
diff options
context:
space:
mode:
Diffstat (limited to 'queries/python')
-rw-r--r--queries/python/indents.scm8
1 files changed, 8 insertions, 0 deletions
diff --git a/queries/python/indents.scm b/queries/python/indents.scm
index efcdba6b2..338473f00 100644
--- a/queries/python/indents.scm
+++ b/queries/python/indents.scm
@@ -83,6 +83,14 @@
(continue_statement)
] @indent.dedent
+(ERROR
+ (_) @indent.branch ":" .
+ (#lua-match? @indent.branch "^else"))
+
+(ERROR
+ (_) @indent.branch @indent.dedent ":" .
+ (#lua-match? @indent.branch "^elif"))
+
(parenthesized_expression ")" @indent.end)
(generator_expression ")" @indent.end)
(list_comprehension "]" @indent.end)