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
Code parsing for run selection in terminal - Python side #14457
Code parsing for run selection in terminal - Python side #14457
Conversation
Codecov Report
@@ Coverage Diff @@
## main #14457 +/- ##
==========================================
+ Coverage 59.18% 59.28% +0.10%
==========================================
Files 720 720
Lines 40216 40332 +116
Branches 5830 5849 +19
==========================================
+ Hits 23803 23912 +109
- Misses 15151 15159 +8
+ Partials 1262 1261 -1
Continue to review full report at Codecov.
|
Just to be sure, I also ran single-workspace tests with the changes that Karthik introduces in #14445, and none of the failures were caused by this code. I also fixed whatever single and multi-workspace test suites that broke from this change (or at least, that the failures weren't caused by this code): https://dev.azure.com/ms/vscode-python/_build/results?buildId=117067&view=results (Test failure reported in #14469) |
# >>> total = x + y | ||
# >>> | ||
if end - start > 1: | ||
block += "\n" |
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.
One thing that didn't occur to me when we were discussing this, is that for the multiline parentheses case, this newline is redundant, since the closing parenthesis terminates the statement already. So for this input:
x = [
1
]
y = [
2
]
The REPL will get a blank line between the two, even though it's not strictly needed:
>>> x = [
... 1
... ]
>>>
>>> y = [
... 2
...]
I think that's okay, since that extra blank line doesn't change behavior, and appearance is not such a big deal for an uncommon code pattern. But it might be worth pointing out in the comments.
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.
Does it change the repel default _
by any chance? It should not, but just curious.
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.
Two more changes:
|
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.
See previous comment
👍 |
Co-authored-by: Karthik Nadig <kanadig@microsoft.com>
Kudos, SonarCloud Quality Gate passed! 0 Bugs |
For #14048
If I may suggest, it might be easier if you checked out the PR locally or looked at the new files directly instead of doing side-by-side comparisons, because it's, uh, not pretty.
package-lock.json
has been regenerated by runningnpm install
(if dependencies have changed).