-
-
Notifications
You must be signed in to change notification settings - Fork 904
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
Ability to disable hint diagnostics request #3104
Comments
Before looking for other solutions, have you tried prefixing unused args with |
Hello! Just tried, doesn't work. |
Did you want to simply disable that particular warning message from the type checker? If so have you tried adding: # type: ignore to the line containing the warning - this should tell pyright to ignore that particular warning, this would also work if you were using mypy. |
Those are not type errors, so it doesn't ignore the diagnostic when I add |
@herberthamaral I tested with pyright and using |
I think the intention from the pyright team appears to be that it wasn't to be displayed as a diagnostic warning but a 'syntax highlight' indicating the variable is unused. I haven't checked any further on what supplemental information they may be supplying to indicate that distinction: |
emacs-lsp/lsp-pyright#39 (comment) > This solved the problem for me. However I suspect it is not enough for every scenario. I'm closing this for now. Thanks, everybody! |
First of all: thanks for all the work done in this project! I (we) really appreciate it!
So I've been trying to disable a very annoying "error" for some months now: a hint diagnostic that both is visually distracting (because I can't do much about it) and misleading (since it adds up to the error count):
I try to read a bunch of code from flycheck, lsp-mode, pyright and finally decided to start opening some issues. Looks like lsp-mode asks pyright to send hint diagnostics, so I'm wondering if we could have a way to NOT send this kind of request, just in order to not have it displayed anywhere in the editor.
I am aware of flycheck error filtering, but it is not global: it is only meant to filter errors in the error list buffer.
The text was updated successfully, but these errors were encountered: