Skip to content
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

Merged
merged 31 commits into from
Apr 5, 2018
Merged

Fix indentation on single-liners and f-strings in type formatting #1312

merged 31 commits into from
Apr 5, 2018

Conversation

MikhailArkhipov
Copy link

Fixes #1292
Fixes #1257
Fixes #726

This pull request:

  • Has a title summarizes what is changing
  • Has unit tests & code coverage is not adversely affected (within reason)

@@ -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';

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+/,

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.

Copy link
Author

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
Copy link

codecov bot commented Apr 5, 2018

Codecov Report

Merging #1312 into master will increase coverage by 0.29%.
The diff coverage is 100%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
src/client/formatters/lineFormatter.ts 99.22% <100%> (+0.02%) ⬆️
src/client/language/tokenizer.ts 96.77% <100%> (+0.03%) ⬆️
src/client/extension.ts 96.09% <100%> (ø) ⬆️
src/client/linters/baseLinter.ts 91.66% <0%> (+4.16%) ⬆️
src/client/common/installer/productInstaller.ts 67.19% <0%> (+6.87%) ⬆️
src/client/common/application/applicationShell.ts 30.76% <0%> (+7.69%) ⬆️
src/client/common/logger.ts 73.33% <0%> (+20%) ⬆️
src/client/linters/errorHandlers/errorHandler.ts 100% <0%> (+22.22%) ⬆️
src/client/linters/errorHandlers/notInstalled.ts 94.44% <0%> (+61.11%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 72ef2ab...17dc292. Read the comment docs.

@MikhailArkhipov MikhailArkhipov merged commit db6030d into microsoft:master Apr 5, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jul 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants