You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following the discussion in microsoft/vscode#142810, I propose MyPy to output a range over which a typing error occurs, instead of just the position of it. The current message with --show-column-numbers and --no-pretty looks like this:
test.py:4:5: error: Argument 1 to "foo" has incompatible type "str"; expected "int"
It'd be great if a range would be included for the column numbers, if possible:
test.py:4:5-15: error: Argument 1 to "foo" has incompatible type "str"; expected "int"
Output with --pretty could then use multiple ^ characters to visualize the range. Omitting --show-column-numbers wouldn't display column numbers at all, thus the output would remain unchanged.
Pitch
This change would allow the VSCode Python extension to output diagnostic objects with proper ranges, since the current implementation only underlines one character and makes it hard to work with, and other proposed solutions appear to be non-trivial at the very least.
The text was updated successfully, but these errors were encountered:
I can address that.
About the use of multiple ^ in my project (pyastrx-alpha) I did something similar, take a look
The range of code shown is controlled by other parameters (context). For colors, I'm using rich, but I believe that is not a good idea to add a dependency in mypy.
Feature
Following the discussion in microsoft/vscode#142810, I propose MyPy to output a range over which a typing error occurs, instead of just the position of it. The current message with
--show-column-numbers
and--no-pretty
looks like this:It'd be great if a range would be included for the column numbers, if possible:
Output with
--pretty
could then use multiple^
characters to visualize the range. Omitting--show-column-numbers
wouldn't display column numbers at all, thus the output would remain unchanged.Pitch
This change would allow the VSCode Python extension to output diagnostic objects with proper ranges, since the current implementation only underlines one character and makes it hard to work with, and other proposed solutions appear to be non-trivial at the very least.
The text was updated successfully, but these errors were encountered: