Replies: 2 comments
-
|
Pyright never emits warnings or errors for unused parameters. Pyright does emit "hints" with an "unnecessary" tag if the client requests them. If a client requests such hints, it should display the associated text in a subtle, grayed-out manner. Here's a screen shot from VS Code that shows how this should be displayed. Some clients that request these hints may display them in an incorrect manner, instead treating them like other diagnostics. I suspect that's what you're experiencing. If so, that's a bug in your client or LSP plugin, and you should file an issue with the appropriate project. The client or LSP plugin should either not request hints with "unnecessary" tags (in which case pyright will not provide them) or it should display them correctly. |
Beta Was this translation helpful? Give feedback.
-
|
I see. Thanks for the clarification. I am using emacs lsp-mode and this is displayed with green underline - less than a warning which is orange, but still distracting. I found another discussion on this topic: emacs-lsp/lsp-mode#3104 |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
pylint has a way to get rid of warnings for unused positional arguments that you need to have by prefixing them with an underscore _.
https://pycodequ.al/docs/pylint-messages/w0613-unused-argument.html
pyright does not seem to respond to this. Is there a way to disable those warnings? Could it be made to respond to the same _ prefix?
Thanks!
Dan
Beta Was this translation helpful? Give feedback.
All reactions