ruff check fix

This commit is contained in:
lda
2026-07-30 01:27:46 +07:00 Verified
parent a3a4fb9250
commit 981edd3cf5
42 changed files with 155 additions and 153 deletions
+1 -1
View File
@@ -112,4 +112,4 @@ def test_context_runtime_runner_uses_workflow_runtime_service(tmp_path: Path) ->
service = WfMcpService(store=FileStore(tmp_path / "context_runtime"))
context = context_from_service(service)
assert getattr(context.runtime, "runtime") is service.workflow_runtime
assert context.runtime.runtime is service.workflow_runtime
+1 -1
View File
@@ -6,8 +6,8 @@ from typing import Any
import pytest
from typer.testing import CliRunner
import wf_cli.commands.caps as caps
from wf_cli.app import app
from wf_cli.commands import caps
from wf_cli.commands.caps import (
CapCallOutputFormat,
render_cap_call_output,
+6 -6
View File
@@ -320,8 +320,8 @@ def test_source_catalog_service_registers_and_lists_sources_directly(
server="demo",
account="personal",
),
connection_list_enabled=lambda: [],
connection_list_all=lambda: [],
connection_list_enabled=list,
connection_list_all=list,
tool_executor_for=unused_tool_executor,
load_auth=lambda connection_id: None,
emit_event=lambda event: None,
@@ -362,8 +362,8 @@ def test_source_catalog_service_excludes_hidden_sources_from_planner_catalog(
server="demo",
account="personal",
),
connection_list_enabled=lambda: [],
connection_list_all=lambda: [],
connection_list_enabled=list,
connection_list_all=list,
tool_executor_for=unused_tool_executor,
load_auth=lambda connection_id: None,
emit_event=lambda event: None,
@@ -538,8 +538,8 @@ def test_source_catalog_uses_catalog_store_only(tmp_path: Path) -> None:
server="demo",
account="personal",
),
connection_list_enabled=lambda: [],
connection_list_all=lambda: [],
connection_list_enabled=list,
connection_list_all=list,
tool_executor_for=lambda connection: (_ for _ in ()).throw(
AssertionError("unexpected executor")
),
+1 -1
View File
@@ -106,7 +106,7 @@ def test_wfmcpservice_uses_broker_event_recorder() -> None:
event_bus=bus,
)
service._record_event( # noqa: SLF001
service._record_event(
make_event("connection_registered", connection_id="demo.personal")
)
@@ -240,8 +240,8 @@ async def test_upstream_transport_live_diagnostics_report_missing_connection() -
source_catalog = SourceCatalogService(
store=transport.catalog_store,
connection_lookup=_raise_missing_connection,
connection_list_enabled=lambda: [],
connection_list_all=lambda: [],
connection_list_enabled=list,
connection_list_all=list,
tool_executor_for=transport.tool_executor_for,
load_auth=transport.load_connection_auth,
emit_event=lambda event: None,
+1 -1
View File
@@ -100,7 +100,7 @@ async def test_httpx_oauth_refresher_posts_refresh_token_grant(
def __init__(self, **kwargs: object) -> None:
assert kwargs["timeout"] == 10.0
async def __aenter__(self) -> "_Client":
async def __aenter__(self) -> _Client:
return self
async def __aexit__(self, *args: object) -> None:
@@ -274,10 +274,10 @@ async def test_open_mcp_session_uses_binder_for_http_headers(
def __init__(self, **kwargs: Any) -> None:
captured_clients.append(kwargs)
async def __aenter__(self) -> "_CapturingClient":
async def __aenter__(self) -> _CapturingClient:
return self
async def __aexit__(self, *args: Any) -> None:
async def __aexit__(self, *args: object) -> None:
return None
import wf_sources_mcp.client.transport as mod
@@ -319,7 +319,7 @@ async def test_open_mcp_session_refreshes_oauth_record_for_http(
def __init__(self, **kwargs: Any) -> None:
captured_clients.append(kwargs)
async def __aenter__(self) -> "_CapturingClient":
async def __aenter__(self) -> _CapturingClient:
return self
async def __aexit__(self, *args: object) -> None:
@@ -365,7 +365,7 @@ async def test_open_mcp_session_refreshes_oauth_record_for_http(
@pytest.mark.asyncio
async def test_open_mcp_session_uses_binder_for_stdio_env() -> None:
import wf_sources_mcp.client.transport as mod # noqa: I001
import wf_sources_mcp.client.transport as mod
from wf_api.auth import EnvAuth, StoredAuthRecord
captured_params: list[Any] = []