fix(server): fix ruff format violations and complete ServerConfig export in server __init__
CI / lint (pull_request) Successful in 1m6s
CI / typecheck (pull_request) Successful in 1m10s
CI / security (pull_request) Successful in 1m9s
CI / push-validation (pull_request) Successful in 34s
CI / helm (pull_request) Successful in 38s
CI / build (pull_request) Successful in 49s
CI / quality (pull_request) Successful in 1m26s
CI / e2e_tests (pull_request) Successful in 3m55s
CI / integration_tests (pull_request) Failing after 6m24s
CI / unit_tests (pull_request) Failing after 9m10s
CI / docker (pull_request) Has been skipped
CI / coverage (pull_request) Successful in 13m46s
CI / status-check (pull_request) Failing after 3s

- Add blank lines before nested async function definitions in langgraph_platform_steps.py to satisfy ruff format check (E302/W391 style)
- Import ServerConfig from .config in server/__init__.py so it is properly exported (was listed in __all__ but not imported)
- Add type annotation to create_app() signature for full static typing compliance
This commit is contained in:
2026-04-24 13:25:10 +00:00
parent 78e10e76aa
commit c7849fd211
2 changed files with 9 additions and 1 deletions
@@ -29,6 +29,7 @@ def step_create_actor_graph(context):
@when("I register the graph with RemoteGraphManager")
def step_register_graph(context):
"""Register the graph with RemoteGraphManager."""
async def _register():
context.manager = RemoteGraphManager(endpoint="http://localhost:8123")
await context.manager.register_graph("test_graph", context.test_graph)
@@ -39,6 +40,7 @@ def step_register_graph(context):
@then("the graph should be available for remote execution")
def step_verify_graph_registered(context):
"""Verify the graph is registered."""
async def _verify():
graph = await context.manager.get_graph("test_graph")
assert graph is not None, "Graph should be registered"
@@ -49,6 +51,7 @@ def step_verify_graph_registered(context):
@given("a registered actor graph")
def step_setup_registered_graph(context):
"""Set up a registered actor graph."""
async def _setup():
context.manager = RemoteGraphManager(endpoint="http://localhost:8123")
context.test_graph = _MockGraph({"output": "test_result"})
@@ -60,6 +63,7 @@ def step_setup_registered_graph(context):
@when("I execute the registered graph with input data")
def step_execute_graph(context):
"""Execute the registered graph."""
async def _execute():
try:
context.result = await context.manager.execute_graph(
@@ -86,6 +90,7 @@ def step_verify_result_returned(context):
@given("multiple registered actor graphs")
def step_setup_multiple_graphs(context):
"""Set up multiple registered graphs."""
async def _setup():
context.manager = RemoteGraphManager(endpoint="http://localhost:8123")
for i in range(3):
@@ -98,6 +103,7 @@ def step_setup_multiple_graphs(context):
@when("I request the list of graphs")
def step_list_graphs(context):
"""Request the list of graphs."""
async def _list():
context.graphs = await context.manager.list_graphs()
@@ -123,6 +129,7 @@ def step_setup_missing_graph(context, graph_id):
@when("I attempt to execute the missing graph")
def step_execute_missing_graph(context):
"""Attempt to execute missing graph."""
async def _execute():
try:
await context.manager.execute_graph(context.missing_graph_id, {})
+2 -1
View File
@@ -6,6 +6,7 @@ actor graphs via LangGraph Platform with RemoteGraph support.
from __future__ import annotations
from .config import ServerConfig
from .remote_graph import RemoteGraphManager
__all__ = [
@@ -15,7 +16,7 @@ __all__ = [
]
def create_app(config=None):
def create_app(config: ServerConfig | None = None) -> object:
"""Create and configure the FastAPI application.
Lazily imports FastAPI to avoid slow import at module load time.