python-lsp / pylsp-mypy

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

Use relative path when calling dmypy #77

Closed pbui-patreon closed 10 months ago

pbui-patreon commented 10 months ago

With rdev development environment (ubuntu 22.04), pylsp-mypy uses the full filepath when linting with dmypy.

This caused some false negatives when linting with my project where in vim (I use vim-lsp + python-lsp-server), vim-lsp/python-lsp-server says the file was linted with no type errors even though I specifically added a type error.

Solution

I've found that making dmypy use a relative path (dmypy runs out of my venv local to the code repo) and everything works.

I've yet to debug further, but this is enough to keep me going for now.