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

Format on type fixes #1798

Merged
merged 104 commits into from
May 31, 2018
Merged

Format on type fixes #1798

merged 104 commits into from
May 31, 2018

Conversation

MikhailArkhipov
Copy link

Fixes #1793
Fixes #1790
Fixes #1788
Fixes #1782
Fixes #1781
Fixes #1780
Fixes #1763

This pull request:

  • Has a title summarizes what is changing
  • Has unit tests & code coverage is 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)

@codecov
Copy link

codecov bot commented May 30, 2018

Codecov Report

Merging #1798 into master will decrease coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1798      +/-   ##
==========================================
- Coverage    74.1%   74.06%   -0.04%     
==========================================
  Files         282      282              
  Lines       13089    13127      +38     
  Branches     2335     2348      +13     
==========================================
+ Hits         9700     9723      +23     
- Misses       3259     3269      +10     
- Partials      130      135       +5
Impacted Files Coverage Δ
src/client/language/tokenizer.ts 97.93% <100%> (+0.13%) ⬆️
src/client/language/textBuilder.ts 100% <100%> (ø) ⬆️
src/client/formatters/lineFormatter.ts 98.49% <100%> (+0.13%) ⬆️
src/client/debugger/PythonProcess.ts 47.91% <0%> (-3.34%) ⬇️
src/client/debugger/mainV2.ts 77.91% <0%> (-2.01%) ⬇️
src/client/debugger/Main.ts 51.85% <0%> (-0.5%) ⬇️

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 3d5f760...c597d82. Read the comment docs.

@@ -10,6 +10,20 @@ import { TextRangeCollection } from '../language/textRangeCollection';
import { Tokenizer } from '../language/tokenizer';
import { ITextRangeCollection, IToken, TokenType } from '../language/types';

const keywordsWithSpaceBeforeBrace = [
'and', 'as', 'assert',
Copy link

@DonJayamanne DonJayamanne May 30, 2018

Choose a reason for hiding this comment

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

Please add await as well (#1786 (comment)).

Copy link
Member

Choose a reason for hiding this comment

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

A complete list of keywords can be found using https://docs.python.org/3/library/keyword.html#keyword.kwlist

Copy link
Author

Choose a reason for hiding this comment

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

This is list of those that may have ( after them. Does not have to be complete.

});
test('Dot operator', () => {
testFormatLine('x.y', 'x.y');
testFormatLine('5 .y', '5.y');
//testFormatLine('- 135 .bit_length()', '-135.bit_length()');

Choose a reason for hiding this comment

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

Any particular reason why this test is commented out?

Copy link
Author

Choose a reason for hiding this comment

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

I am yet to get to #1784, quite an edge case. The - part is covered by another test.

@MikhailArkhipov MikhailArkhipov merged commit 51224e7 into microsoft:master May 31, 2018
@MikhailArkhipov MikhailArkhipov deleted the format branch June 7, 2018 16:35
@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.