Skip to content

how to disable this diagnostic: [<var> is not accessed.] #9692

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

You must be logged in to vote

When you run pyright from the command line, it never emits "tagged hints". Tagged hints are emitted only in "language server" mode and only if the editor says that it supports that tag. When an editor receives such a hint, it should display the range as slightly "dimmed" as a subtle hint that the symbol is unused. Some editors unfortunately claim to support these hints but then display them as regular diagnostics. If you're using such an editor, you can tell pyright to not emit any tagged hints by setting pyright.disableTaggedHints to true in your language server configuration.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@erictraut
Comment options

Answer selected by amirongit
@amirongit
Comment options

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