Skip to content

Commit 36b560e

Browse files
committed
fix: ensure iter_methods is a generator and fix anyio devnull usage
1 parent aa740f1 commit 36b560e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/lsp_client/protocol/capability.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ def iter_methods(cls) -> Iterator[str]:
2020
LSP methods associated with this capability.
2121
"""
2222

23+
yield from ()
24+
2325
@classmethod
2426
def check_server_capability(cls, cap: lsp_type.ServerCapabilities) -> None:
2527
"""

src/lsp_client/server/container.py

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

3+
import subprocess
34
from collections.abc import AsyncGenerator
45
from contextlib import asynccontextmanager
56
from pathlib import Path
@@ -197,8 +198,8 @@ async def check_availability(self) -> None:
197198
try:
198199
await anyio.run_process(
199200
[self.backend, "pull", self.image],
200-
stdout=anyio.streams.devnull.DevnullStream(),
201-
stderr=anyio.streams.devnull.DevnullStream(),
201+
stdout=subprocess.DEVNULL,
202+
stderr=subprocess.DEVNULL,
202203
)
203204
except anyio.ProcessError as e:
204205
raise RuntimeError(

0 commit comments

Comments
 (0)