33from collections .abc import Sequence
44from typing import Protocol , override , runtime_checkable
55
6+ from loguru import logger
7+
68from lsp_client .jsonrpc .id import jsonrpc_uuid
79from 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