From c02fbe6b4c8efa71e98d12e3d64ff2d6cde68f18 Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Thu, 31 May 2018 10:42:55 -0700 Subject: [PATCH] Fix indentation when function contains type hints --- news/2 Fixes/1461.md | 1 + src/client/extension.ts | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) create mode 100644 news/2 Fixes/1461.md diff --git a/news/2 Fixes/1461.md b/news/2 Fixes/1461.md new file mode 100644 index 000000000000..1c8c770456a9 --- /dev/null +++ b/news/2 Fixes/1461.md @@ -0,0 +1 @@ +Fix indentation when function contains type hints. diff --git a/src/client/extension.ts b/src/client/extension.ts index 05a15fa5db55..8d1cbb428e6c 100644 --- a/src/client/extension.ts +++ b/src/client/extension.ts @@ -103,10 +103,6 @@ export async function activate(context: ExtensionContext) { // tslint:disable-next-line:no-non-null-assertion languages.setLanguageConfiguration(PYTHON_LANGUAGE, { onEnterRules: [ - { - beforeText: /^\s*(?:def|class|for|if|elif|else|while|try|with|finally|except)\b.*:\s*\S+/, - action: { indentAction: IndentAction.None } - }, { beforeText: /^\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async)\b.*:\s*/, action: { indentAction: IndentAction.Indent }