When I enable mypy linting, all errors are attributed to the beginning of the line (column 0) like this:

By default, mypy doesn't emit any column information, but it can be configured to do so using the show_column_numbers option in the configuration file or command line. If column information is emitted, the output parser should be able to take advantage of this additional information.
I was able to fix this by changing the REGEX in mypy.ts to the following:
export const REGEX = '(?<file>[^:]+):(?<line>\\d+)(:(?<column>\\d+))?: (?<type>\\w+): (?<message>.*)\\r?(\\n|$)';
With this change — and with show_column_numbers enabled, the red squiggles now correctly highlight the errant code, making the tool significantly more useful.

The proposed change works both with and without show_column_numbers enabled.
If this fix is acceptable, I'm happy to submit a PR.
Environment data
- VS Code version: 1.29.1
- Extension version: master branch built on 7 Dec, 2018
When I enable mypy linting, all errors are attributed to the beginning of the line (column 0) like this:
By default, mypy doesn't emit any column information, but it can be configured to do so using the
show_column_numbersoption in the configuration file or command line. If column information is emitted, the output parser should be able to take advantage of this additional information.I was able to fix this by changing the REGEX in mypy.ts to the following:
With this change — and with
show_column_numbersenabled, the red squiggles now correctly highlight the errant code, making the tool significantly more useful.The proposed change works both with and without
show_column_numbersenabled.If this fix is acceptable, I'm happy to submit a PR.
Environment data