Skip to content

Commit 3e4b051

Browse files
committed
fix: update deno
1 parent 4e5441f commit 3e4b051

File tree

1 file changed

+34
-23
lines changed

1 file changed

+34
-23
lines changed

src/lsp_client/clients/deno/extension.py

Lines changed: 34 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from __future__ import annotations
22

3-
from collections.abc import Sequence
3+
from collections.abc import Iterator, Sequence
44
from typing import Any, Protocol, override, runtime_checkable
55

66
from loguru import logger
@@ -62,8 +62,9 @@ class WithRequestDenoCache(
6262
):
6363
@override
6464
@classmethod
65-
def methods(cls) -> Sequence[str]:
66-
return (DENO_CACHE,)
65+
def iter_methods(cls) -> Iterator[str]:
66+
yield from super().iter_methods()
67+
yield from (DENO_CACHE,)
6768

6869
async def request_deno_cache(
6970
self,
@@ -93,8 +94,9 @@ class WithRequestDenoPerformance(
9394
):
9495
@override
9596
@classmethod
96-
def methods(cls) -> Sequence[str]:
97-
return (DENO_PERFORMANCE,)
97+
def iter_methods(cls) -> Iterator[str]:
98+
yield from super().iter_methods()
99+
yield from (DENO_PERFORMANCE,)
98100

99101
async def request_deno_performance(self) -> Any:
100102
return await self.request(
@@ -111,8 +113,9 @@ class WithRequestDenoReloadImportRegistries(
111113
):
112114
@override
113115
@classmethod
114-
def methods(cls) -> Sequence[str]:
115-
return (DENO_RELOAD_IMPORT_REGISTRIES,)
116+
def iter_methods(cls) -> Iterator[str]:
117+
yield from super().iter_methods()
118+
yield from (DENO_RELOAD_IMPORT_REGISTRIES,)
116119

117120
async def request_deno_reload_import_registries(self) -> None:
118121
return await self.request(
@@ -129,8 +132,9 @@ class WithRequestDenoVirtualTextDocument(
129132
):
130133
@override
131134
@classmethod
132-
def methods(cls) -> Sequence[str]:
133-
return (DENO_VIRTUAL_TEXT_DOCUMENT,)
135+
def iter_methods(cls) -> Iterator[str]:
136+
yield from super().iter_methods()
137+
yield from (DENO_VIRTUAL_TEXT_DOCUMENT,)
134138

135139
async def request_deno_virtual_text_document(
136140
self,
@@ -155,8 +159,9 @@ class WithRequestDenoTask(
155159
):
156160
@override
157161
@classmethod
158-
def methods(cls) -> Sequence[str]:
159-
return (DENO_TASK,)
162+
def iter_methods(cls) -> Iterator[str]:
163+
yield from super().iter_methods()
164+
yield from (DENO_TASK,)
160165

161166
async def request_deno_task(self) -> list[Any]:
162167
return await self.request(
@@ -174,8 +179,9 @@ class WithRequestDenoTestRun(
174179
):
175180
@override
176181
@classmethod
177-
def methods(cls) -> Sequence[str]:
178-
return (DENO_TEST_RUN,)
182+
def iter_methods(cls) -> Iterator[str]:
183+
yield from super().iter_methods()
184+
yield from (DENO_TEST_RUN,)
179185

180186
@override
181187
@classmethod
@@ -203,8 +209,9 @@ class WithRequestDenoTestRunCancel(
203209
):
204210
@override
205211
@classmethod
206-
def methods(cls) -> Sequence[str]:
207-
return (DENO_TEST_RUN_CANCEL,)
212+
def iter_methods(cls) -> Iterator[str]:
213+
yield from super().iter_methods()
214+
yield from (DENO_TEST_RUN_CANCEL,)
208215

209216
async def request_deno_test_run_cancel(
210217
self,
@@ -227,8 +234,9 @@ class WithReceiveDenoRegistryStatus(
227234
):
228235
@override
229236
@classmethod
230-
def methods(cls) -> Sequence[str]:
231-
return (DENO_REGISTRY_STATE,)
237+
def iter_methods(cls) -> Iterator[str]:
238+
yield from super().iter_methods()
239+
yield from (DENO_REGISTRY_STATE,)
232240

233241
async def receive_deno_registry_state(
234242
self, noti: DenoRegistryStatusNotification
@@ -257,8 +265,9 @@ class WithReceiveDenoTestModule(
257265
):
258266
@override
259267
@classmethod
260-
def methods(cls) -> Sequence[str]:
261-
return (DENO_TEST_MODULE,)
268+
def iter_methods(cls) -> Iterator[str]:
269+
yield from super().iter_methods()
270+
yield from (DENO_TEST_MODULE,)
262271

263272
async def receive_deno_test_module(self, noti: DenoTestModuleNotification) -> None:
264273
logger.debug("Received Deno test module: {}", noti.params)
@@ -285,8 +294,9 @@ class WithReceiveDenoTestModuleDelete(
285294
):
286295
@override
287296
@classmethod
288-
def methods(cls) -> Sequence[str]:
289-
return (DENO_TEST_MODULE_DELETE,)
297+
def iter_methods(cls) -> Iterator[str]:
298+
yield from super().iter_methods()
299+
yield from (DENO_TEST_MODULE_DELETE,)
290300

291301
async def receive_deno_test_module_delete(
292302
self, noti: DenoTestModuleDeleteNotification
@@ -315,8 +325,9 @@ class WithReceiveDenoTestRunProgress(
315325
):
316326
@override
317327
@classmethod
318-
def methods(cls) -> Sequence[str]:
319-
return (DENO_TEST_RUN_PROGRESS,)
328+
def iter_methods(cls) -> Iterator[str]:
329+
yield from super().iter_methods()
330+
yield from (DENO_TEST_RUN_PROGRESS,)
320331

321332
async def receive_deno_test_run_progress(
322333
self, noti: DenoTestRunProgressNotification

0 commit comments

Comments
 (0)