Update pygls (#83)

This commit is contained in:
Regen
2023-10-13 19:07:22 +09:00
committed by GitHub
parent cd7ba40b55
commit 0916b888d8
5 changed files with 325 additions and 274 deletions

View File

@@ -34,7 +34,7 @@ def _init(client: LanguageServer, root: Path) -> None:
retry = 3
while retry > 0:
try:
client.lsp.send_request(
client.lsp.send_request( # type:ignore[no-untyped-call]
INITIALIZE,
InitializeParams(
process_id=1234,
@@ -77,9 +77,9 @@ def _test_completion(
position=Position(line=0, character=len(content)),
context=context,
)
ret = client.lsp.send_request(TEXT_DOCUMENT_COMPLETION, params).result(
timeout=CALL_TIMEOUT
)
ret = client.lsp.send_request( # type:ignore[no-untyped-call]
TEXT_DOCUMENT_COMPLETION, params
).result(timeout=CALL_TIMEOUT)
assert isinstance(ret, CompletionList)
return ret
@@ -141,7 +141,7 @@ def test_formatting(
_init(client, datadir)
path = datadir / "CMakeLists.txt"
_open(client, path, "a ( b c ) ")
response = client.lsp.send_request(
response = client.lsp.send_request( # type:ignore[no-untyped-call]
TEXT_DOCUMENT_FORMATTING,
DocumentFormattingParams(
text_document=TextDocumentIdentifier(uri=path.as_uri()),
@@ -158,7 +158,7 @@ def test_hover(
_init(client, datadir)
path = datadir / "CMakeLists.txt"
_open(client, path, "project()")
response = client.lsp.send_request(
response = client.lsp.send_request( # type:ignore[no-untyped-call]
TEXT_DOCUMENT_HOVER,
HoverParams(
text_document=TextDocumentIdentifier(uri=path.as_uri()),