From 48f9d8a44119ef044d1a58055f7d4ed01e2f964a Mon Sep 17 00:00:00 2001 From: Rich Chiodo Date: Fri, 31 May 2024 13:01:28 -0700 Subject: [PATCH] Add comment in formatOnType to indicate autoIndent is set to 'none' (#5949) * Make autoIndent default value Not sure if this was on purpose, but it seems like we'd want to test with the defaults? * Add some comments to formatOnType * Change PR to add a comment explaining mode --- testing/single/.vscode/settings.json | 4 +++- testing/single/src/formatOnType.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/testing/single/.vscode/settings.json b/testing/single/.vscode/settings.json index be999a3e..56e4e827 100644 --- a/testing/single/.vscode/settings.json +++ b/testing/single/.vscode/settings.json @@ -18,5 +18,7 @@ // "source.unusedImports", // "source.convertImportFormat" // ] - "python.analysis.extraPaths": ["${workspaceFolder:utfinname日本}"] + "python.analysis.extraPaths": [ + "${workspaceFolder:utfinname日本}" + ], } diff --git a/testing/single/src/formatOnType.py b/testing/single/src/formatOnType.py index 6b311310..fe33a360 100644 --- a/testing/single/src/formatOnType.py +++ b/testing/single/src/formatOnType.py @@ -1,4 +1,7 @@ # you can trigger format on type by hitting enter at the end of statement +# This test assumes `editor.autoIndent` is set to 'none'. This is to ensure +# the outcomes described are consistent. If you want to do ad-hoc testing, you should +# change this value back to the default. # place cursor after `:` and hit enter and confirm cursor is placed # at the expected indentation @@ -21,7 +24,6 @@ pass # type `:` after `else` and see `else` is moved to right position. else - # Set "autoFormatStrings" to true and add a { into the string below. Make sure # it auto adds the `f` on the front. Repeat for the other strings