From 0decb747ac9239faf5119b7faa80596995746ef9 Mon Sep 17 00:00:00 2001 From: blasty Date: Fri, 24 Jul 2026 14:41:23 +0200 Subject: refactor: extract shared error hierarchy + Session into idatui/errors.py The IDAError/IDAConnectionError/IDAToolError/... exceptions and the Session dataclass were defined in client.py (the ida-pro-mcp HTTP client), but the idalib worker path (worker_client/domain/app) needs them without the HTTP transport. Move them to a transport-agnostic errors.py; client.py re-exports them so the deprecated mcp tooling and stress tests are unchanged (verified: errors.IDAToolError IS client.IDAToolError, so cross-module `except` still works). worker_client, domain (TYPE_CHECKING-guarded IDAClient hint), app, and __init__ now import the shared types from errors.py. This decouples the worker path from client.py at runtime -- the prerequisite for deleting the mcp transport. --- idatui/worker_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'idatui/worker_client.py') diff --git a/idatui/worker_client.py b/idatui/worker_client.py index 8dd8491..27fa660 100644 --- a/idatui/worker_client.py +++ b/idatui/worker_client.py @@ -23,7 +23,7 @@ import time import uuid from typing import Any -from .client import IDAToolError, IDAConnectionError, Session +from .errors import IDAToolError, IDAConnectionError, Session from .worker import recv as _recv from .worker import send as _send -- cgit v1.3.1-sl0p