Skip to content

How to increase severity for argument name not accessed #3018

Answered by erictraut
jugmac00 asked this question in Q&A
Discussion options

You must be logged in to vote

Pylance does not emit diagnostics (errors, warnings, etc.) for an unused parameter, so there's no way to adjust the severity. There are many legitimate cases in Python for function parameters that must be present but go unused (e.g. magic methods, abstract method implementations, protocol method implementations, base class method overrides), so emitting a diagnostic for this case would be produce many false positives. Instead, Pylance uses a subtle "grayed out" effect so you can see that a parameter is unreferenced and decide whether that's appropriate in your particular case.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jugmac00
Comment options

Answer selected by jugmac00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants