| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…e rest of the line
There was a problem hiding this comment.
I recall they we had this version implemented but we did abandoned it because it looked weird in done scenarios. I am missing anything or is the fact that we are stopping in whitespace enough to account for the problems with the old approach?
Sorry, something went wrong.
|
The old approach was highlighting the whole line if the end_offset is greater than 256 (-1) but where the instruction was only covering a single line. This is about when an expression covers multiple lines (e.g the call above). Since we now the start point, and we know for a fact that the instruction continue to next lines we can just highlight the line to the end without any false positives. |
Sorry, something went wrong.
|
Can you add some extra tests with some specific cases like function calls spawning multiple lines as well as binops spawning multiple lines (for example)? I will like to cover this with more cases if possible, |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM modulo my comment regarding more tests
Sorry, something went wrong.
|
@isidentical: Status check is done, and it's a success ✅ . |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This is basically something that I noticed up while fixing test runs for another issue. It is really common to have multiline calls, and when they fail the display is kind of weird since we omit the annotations. E.g;
$ ./python t.py Traceback (most recent call last): File "/home/isidentical/cpython/cpython/t.py", line 11, in <module> frame_1() ^^^^^^^^^ File "/home/isidentical/cpython/cpython/t.py", line 5, in frame_1 frame_2( File "/home/isidentical/cpython/cpython/t.py", line 2, in frame_2 return a / 0 / b / c ~~^~~ ZeroDivisionError: division by zeroThis patch basically adds support for annotating the rest of the line, if the instruction covers multiple lines (start_line != end_line).
https://bugs.python.org/issue43950
Automerge-Triggered-By: GH:isidentical