Open vikigenius opened 2 weeks ago
lsp-mode
M-x lsp-start-plain
False positive in lsp pyright doesn't match command line behavior
from typing import Literal class LWPRSService(object): """Lightweight PRS Service.""" def __init__(self, env: Literal["prod", "dev", "stg"] = "stg", country: Literal["us", "ca"] = "us") -> None: super().__init__()
Shows
[Trace - 05:41:47 PM] Received notification 'textDocument/publishDiagnostics'. Params: { "uri": "file:///home/void/Projects/Research/lexutilair/src/lexutilair/prs.py", "version": 0, "diagnostics": [ { "range": { "start": { "line": 8, "character": 23 }, "end": { "line": 8, "character": 26 } }, "message": "\"env\" is not accessed", "severity": 4, "source": "Pyright", "tags": [ 1 ] }, { "range": { "start": { "line": 8, "character": 67 }, "end": { "line": 8, "character": 74 } }, "message": "\"country\" is not accessed", "severity": 4, "source": "Pyright", "tags": [ 1 ] } ] }
When I run the file through the pyright CLI no diagnostics are produced.
Setting reportUnusedVarialbe = false in pyproject.toml has no effect. And it should not be needed in the first place.
reportUnusedVarialbe = false
lsp-pyright
Linux
No response
I do see a bunch of messages Invalid face reference: lsp-flycheck-info-unnecessary [79 times]. Don't know if that is related.
Invalid face reference: lsp-flycheck-info-unnecessary [79 times]
Thank you for the bug report
lsp-mode
related packages.M-x lsp-start-plain
Bug description
False positive in lsp pyright doesn't match command line behavior
Steps to reproduce
Shows
Expected behavior
When I run the file through the pyright CLI no diagnostics are produced.
Setting
reportUnusedVarialbe = false
in pyproject.toml has no effect. And it should not be needed in the first place.Which Language Server did you use?
lsp-pyright
OS
Linux
Error callstack
No response
Anything else?
I do see a bunch of messages
Invalid face reference: lsp-flycheck-info-unnecessary [79 times]
. Don't know if that is related.