mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-13 02:14:49 +00:00
Fixing more minor typing issues
This commit is contained in:
1 parent
c2eabde324
commit
d680c83f76
4 files changed
+7
-6
No files matched your search
@@ -23,4 +23,4 @@ USE_SOLID_LSP = True
|
||||
"""Whether to use Solid LSP instead of multilspy for language server operations.
|
||||
Multilspy uses asyncio, which creates many problems like deadlocks and requires full process
|
||||
isolation (and even then some issues remain).
|
||||
"""
|
||||
"""
|
||||
+2
-1
@@ -188,10 +188,11 @@ class SerenaMCPFactory:
|
||||
mcp = FastMCP(**mcp_settings.model_dump())
|
||||
return mcp
|
||||
|
||||
@asynccontextmanager # type: ignore
|
||||
@asynccontextmanager
|
||||
@abstractmethod
|
||||
async def server_lifespan(self, mcp_server: FastMCP) -> AsyncIterator[None]:
|
||||
"""Manage server startup and shutdown lifecycle."""
|
||||
yield None # ensures MyPy understands we yield None
|
||||
|
||||
|
||||
class SerenaMCPFactorySingleProcess(SerenaMCPFactory):
|
||||
|
||||
@@ -414,10 +414,10 @@ class ProcessIsolatedSerenaAgent:
|
||||
|
||||
# Create communication pipe
|
||||
parent_conn, child_conn = multiprocessing.Pipe()
|
||||
self.conn = parent_conn # type: ignore
|
||||
self.conn = parent_conn
|
||||
|
||||
# Create and start worker process, passing along the dashboard's queue if available
|
||||
worker = SerenaAgentWorker(child_conn) # type: ignore
|
||||
worker = SerenaAgentWorker(child_conn)
|
||||
self.process = multiprocessing.Process(target=worker.run, args=[_global_log_queue])
|
||||
self.process.start()
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ def execute_shell_command(command: str, cwd: str | None = None, capture_stderr:
|
||||
stdin=subprocess.DEVNULL,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE if capture_stderr else None,
|
||||
creationflags=subprocess.CREATE_NO_WINDOW if is_windows else 0,
|
||||
creationflags=subprocess.CREATE_NO_WINDOW if is_windows else 0, # type: ignore
|
||||
text=True,
|
||||
encoding="utf-8",
|
||||
errors="replace",
|
||||
@@ -50,7 +50,7 @@ def subprocess_check_output(args: list[str], encoding: str = "utf-8", strip: boo
|
||||
"env": os.environ.copy(),
|
||||
}
|
||||
if platform.system() == "Windows":
|
||||
kwargs["creationflags"] = subprocess.CREATE_NO_WINDOW
|
||||
kwargs["creationflags"] = subprocess.CREATE_NO_WINDOW # type: ignore
|
||||
output = subprocess.check_output(args, **kwargs).decode(encoding) # type: ignore
|
||||
if strip:
|
||||
output = output.strip()
|
||||
|
||||
Reference in new issue
Block a user