python-lsp / pylsp-mypy

Mypy plugin for the Python LSP Server.
MIT License
130 stars 37 forks source link

Catch mypy diagnostics which omit start column/end ranges #72

Closed HealsCodes closed 1 year ago

HealsCodes commented 1 year ago

There are a few mypy diagnostics which currently slip through pylsp-mypy's reporting because even with the --show-column-numbers and --show-error-end those messages do not include a full column and end range.

A good example is the output of --warn-unused-ignores:

src/MainWindow.py:30: error: Unused "type: ignore[name-defined]" comment  [unused-ignore]

This commit adds a second line-regexp that catches mypy diagnostics which only include a starting line but have no column or end marker and maps them to an error in the first column of that line.

Richardk2n commented 1 year ago

This has been fixed already and is not your fault. I did a quick rebase.