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 }