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

Handle line formatting when line is in a middle or at the end of a multiline string #2424

Closed
wants to merge 72 commits into from

Conversation

MikhailArkhipov
Copy link

Fixes #2323

  • Title summarizes what is changing
  • Includes a news entry file (remember to thank yourself!)
  • Unit tests & code coverage are not adversely affected (within reason)
  • Works on all actively maintained versions of Python (e.g. Python 2.7 & the latest Python 3 release)
  • Works on Windows 10, macOS, and Linux (e.g. considered file system case-sensitivity)

Added setting to control language server log output through the `python.analysis.logLevel` setting (the default is now 'Error').
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why it shows it as new...

@codecov
Copy link

codecov bot commented Aug 22, 2018

Codecov Report

Merging #2424 into master will increase coverage by 0.12%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2424      +/-   ##
==========================================
+ Coverage    75.4%   75.53%   +0.12%     
==========================================
  Files         309      309              
  Lines       14331    14390      +59     
  Branches     2536     2542       +6     
==========================================
+ Hits        10807    10870      +63     
+ Misses       3515     3512       -3     
+ Partials        9        8       -1
Flag Coverage Δ
#MacOS 74.35% <100%> (+0.09%) ⬆️
#Windows 74.48% <100%> (+0.13%) ⬆️
Impacted Files Coverage Δ
src/client/language/types.ts 97.43% <100%> (+0.29%) ⬆️
src/client/formatters/lineFormatter.ts 98.27% <100%> (+0.16%) ⬆️
src/client/language/tokenizer.ts 98.11% <100%> (-0.02%) ⬇️
src/client/common/utils.ts 74.68% <0%> (-1.64%) ⬇️
src/client/linters/lintingEngine.ts 91.15% <0%> (-0.89%) ⬇️
src/client/debugger/mainV2.ts 68.32% <0%> (-0.36%) ⬇️
src/client/common/serviceRegistry.ts 100% <0%> (ø) ⬆️
src/client/common/types.ts 100% <0%> (ø) ⬆️
src/client/debugger/banner.ts 91.89% <0%> (+11.89%) ⬆️

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 6369262...96ae23b. Read the comment docs.

});
test('Grammar file', function () {
// tslint:disable-next-line:no-invalid-this
this.timeout(50000);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps reconsider adding 50 seconds to our test run time. Maybe the async file read version would help? Then do the testing part via the .then clause.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is just an experiment, the test takes ~6s on desktop. It was timing out, I wanted to check if it is Travis VM that is slow.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood! (I'm struggling with a test timeout issue now too - so frustrating!).

@MikhailArkhipov
Copy link
Author

Closing in favor of microsoft/python-language-server#5

@MikhailArkhipov MikhailArkhipov deleted the 2323 branch October 4, 2018 17:15
@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
Development

Successfully merging this pull request may close these issues.

formatOnType removes the space between string and brace on the last line of multiline f-string
3 participants