-
Notifications
You must be signed in to change notification settings - Fork 37
Expose generic mypy error as a diagnostic #40
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
Conversation
611e67f
to
03975b7
Compare
As far as I remember these outputs are often warnings rather than errors. Therefore I am not sure if I want to always expose it. Is your experience different in that regard? Also in regard to the CI configuration: |
The mypy output in this case is literally what I've quoted and it comes from But I guess what I should do to be safe is to create an error diagnostic if return code was non-0 and otherwise a warning.
Not sure apart from the fact that adding as |
|
ping |
I have been away for the past 2 weeks. Your contribution is appreciated. I will have a detailed look and test it on the weekend. |
The code has become quite complex. For now, I am ok with increasing the limit (that we did not adhere to anyway). For the future, I would like to try to get this down. |
Generic mypy error was only visible to the user when running pylsp with
--verbose --verbose
.It took me way too much time to figure out why pylsp_mypy is not producing the same errors as the command-line variant did. It turned out the error was:
but that was only visible after I went and looked at pylsp_mypy source code and added some logs (didn't know about
--verbose --verbose
exposing that information at the time).That motivated me to expose this error as a diagnostic on the first line.
Also aligned local mypy configuration with one used on CI to get consistent results.