Skip to content
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

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

Merged
merged 3 commits into from
Nov 15, 2023
Merged

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

merged 3 commits into from
Nov 15, 2023

Conversation

HealsCodes
Copy link

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.

pylsp_mypy/plugin.py Outdated Show resolved Hide resolved
Heals and others added 3 commits November 15, 2023 19:21
This commit adds a second line-regexp that catches
mypy diagnostics which only include a starting line
but have no column or end marker (i.e. --warn-unused-ignores).
Co-authored-by: Rafał Chłodnicki <rchl2k@gmail.com>
@Richardk2n
Copy link
Member

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

@Richardk2n Richardk2n merged commit 89cff67 into python-lsp:master Nov 15, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants