We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ee150b8 commit 5895973Copy full SHA for 5895973
2 files changed
mode/python/python.js
@@ -318,7 +318,7 @@
318
state.dedent += 1;
319
320
if (current == "lambda") state.lambda = true;
321
- if (current == ":" && !state.lambda && top(state).type == "py")
+ if (current == ":" && !state.lambda && top(state).type == "py" && stream.match(/^\s*(?:#|$)/, false))
322
pushPyScope(state);
323
324
if (current.length == 1 && !/string|comment/.test(style)) {
mode/python/test.js
@@ -41,4 +41,8 @@
41
MT("bracesInFString", "[string f']{[variable x] [operator +] {}}[string !']")
42
43
MT("nestedFString", "[string f']{[variable b][[ [string f\"c\"] ]]}[string f'] [comment # oops]")
44
+
45
+ MT("dontIndentTypeDecl",
46
+ "[variable i]: [builtin int] [operator =] [number 32]",
47
+ "[builtin print]([variable i])")
48
})();
0 commit comments