Suppressing unused variable diagnostic #7410
Closed
stephen-huan
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
Pyright is working as designed here. Please read #1118 if you are interested in details. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
no longer suppresses the diagnostic hint (from the LSP) that "x" is not accessed which I realized by bisecting to 6426ebc.
Instead, one can use
which works for one argument but not multiple as it's impossible to declare a function with the header
f(_, _)
.Instead, one has the use the awkward pattern
Would it be possible to suppress the diagnostic hint for variables whose name starts with an underscore, like
reportUnusedVariable
? That would permit writing the naturalAlternatively, ignoring
"_"*n
also makes sense.Beta Was this translation helpful? Give feedback.
All reactions