Skip to content

The agent that grows with you

fix(mcp): keep the new resolver lines formatter-stable

Konstantin Khlopkov9eca7f388f71
diff --git a/tests/tools/test_mcp_tool_issue_948.py b/tests/tools/test_mcp_tool_issue_948.py
index eb8bce1946c..e6a49c0664c 100644
--- a/tests/tools/test_mcp_tool_issue_948.py
+++ b/tests/tools/test_mcp_tool_issue_948.py
@@ -127,7 +127,8 @@ def test_resolve_stdio_command_absent_path_is_a_miss(tmp_path, monkeypatch):
command, _env = _resolve_stdio_command("some-mcp-server", {"OTHER": "1"})
- assert command == "some-mcp-server" # absent child PATH: honest miss, not an ambient hit
+ # absent child PATH: honest miss, not an ambient hit
+ assert command == "some-mcp-server"
with patch.dict("os.environ", {"PATH": str(parent_bin)}):
command, _env = _resolve_stdio_command("node", {"OTHER": "1"})
diff --git a/tools/mcp_tool_config.py b/tools/mcp_tool_config.py
index 589d64f6114..954de1830ca 100644
--- a/tools/mcp_tool_config.py
+++ b/tools/mcp_tool_config.py
@@ -143,7 +143,8 @@ def _which_with_config_pathext(command: str, path_arg, env: dict):
cfg_pathext = next((v for k, v in env.items() if k.upper() == "PATHEXT" and isinstance(v, str) and v.strip()), None)
if not cfg_pathext or cfg_pathext == os.environ.get("PATHEXT"):
return None
- exts = [ext for ext in cfg_pathext.split(";") if ext] # PATHEXT is Windows-defined: ";"-separated even when resolved off-Windows
+ # PATHEXT is Windows-defined: ";"-separated even when resolved off-Windows
+ exts = [ext for ext in cfg_pathext.split(";") if ext]
candidates = [command + ext for ext in exts]
if not candidates or any(command.lower().endswith(ext.lower()) for ext in exts):
candidates = [command]