-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix indentation on single-liners and f-strings in type formatting #1312
Conversation
src/client/extension.ts
Outdated
@@ -75,7 +74,8 @@ export async function activate(context: ExtensionContext) { | |||
const configuration = serviceManager.get<IConfigurationService>(IConfigurationService); | |||
const pythonSettings = configuration.getSettings(); | |||
|
|||
const activator: IExtensionActivator = IS_ANALYSIS_ENGINE_TEST || !pythonSettings.jediEnabled | |||
const analysisEngineTest = process.env.VSC_PYTHON_ANALYSIS === '1'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please move to src/client/common/constants.ts
(that's where we have isTestExecution()
@@ -108,7 +108,11 @@ export async function activate(context: ExtensionContext) { | |||
languages.setLanguageConfiguration(PYTHON.language!, { | |||
onEnterRules: [ | |||
{ | |||
beforeText: /^\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async)\b.*/, | |||
beforeText: /^\s*(?:def|class|for|if|elif|else|while|try|with|finally|except)\b.*:\s*\S+/, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've created an issue (#1314) to ensure we try (some how) create tests to test this indentation. We've had to make changes to this area a number of times.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, yet to figure out how to simulate typing in VSC.
Codecov Report
@@ Coverage Diff @@
## master #1312 +/- ##
==========================================
+ Coverage 71.08% 71.38% +0.29%
==========================================
Files 269 269
Lines 12383 12390 +7
Branches 2190 2196 +6
==========================================
+ Hits 8802 8844 +42
+ Misses 3449 3414 -35
Partials 132 132
Continue to review full report at Codecov.
|
Fixes #1292
Fixes #1257
Fixes #726
This pull request: