Skip to content

Commit fe00ca7

Browse files
committed
fix: fix review
1 parent 6888ca2 commit fe00ca7

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/lsp_client/capability/request/pull_diagnostic.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
from collections.abc import Sequence
44
from typing import Protocol, override, runtime_checkable
55

6+
from loguru import logger
7+
68
from lsp_client.jsonrpc.id import jsonrpc_uuid
79
from lsp_client.protocol import (
810
CapabilityClientProtocol,
@@ -53,9 +55,10 @@ def check_server_capability(
5355
super().check_server_capability(cap, info)
5456
assert cap.diagnostic_provider
5557

56-
async def request_diagnostic_report(
58+
async def request_diagnostic(
5759
self,
5860
file_path: AnyPath,
61+
*,
5962
identifier: str | None = None,
6063
previous_result_id: str | None = None,
6164
) -> lsp_type.DocumentDiagnosticReport | None:
@@ -80,6 +83,7 @@ async def request_diagnostic_report(
8083
async def request_diagnostics(
8184
self,
8285
file_path: AnyPath,
86+
*,
8387
identifier: str | None = None,
8488
previous_result_id: str | None = None,
8589
) -> Sequence[lsp_type.Diagnostic] | None:
@@ -96,4 +100,8 @@ async def request_diagnostics(
96100
case lsp_type.FullDocumentDiagnosticReport(items=items):
97101
return items
98102
case _:
103+
logger.warning(
104+
"Unsupported diagnostic report type for file {}",
105+
file_path,
106+
)
99107
return None

0 commit comments

Comments
 (0)