Skip to content

Commit 2cb2a71

Browse files
author
MadaraUchiha-314
committed
fix: format using nox
1 parent bae1774 commit 2cb2a71

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

src/a2a/server/apps/jsonrpc/fastapi_app.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def add_routes_to_app(
5454
app: FastAPI,
5555
agent_card_url: str = '/.well-known/agent.json',
5656
rpc_url: str = '/',
57-
extended_agent_card_url: str = '/agent/authenticatedExtendedCard'
57+
extended_agent_card_url: str = '/agent/authenticatedExtendedCard',
5858
) -> None:
5959
"""Adds the routes to the FastAPI application.
6060
@@ -64,6 +64,7 @@ def add_routes_to_app(
6464
rpc_url: The URL for the A2A JSON-RPC endpoint.
6565
extended_agent_card_url: The URL for the authenticated extended agent card endpoint.
6666
"""
67+
6768
@app.post(rpc_url)
6869
async def handle_a2a_request(request: Request) -> Response:
6970
return await self._handle_requests(request)
@@ -79,7 +80,7 @@ async def get_extended_agent_card(request: Request) -> Response:
7980
return await self._handle_get_authenticated_extended_agent_card(
8081
request
8182
)
82-
83+
8384
def build(
8485
self,
8586
agent_card_url: str = '/.well-known/agent.json',
@@ -100,6 +101,8 @@ def build(
100101
"""
101102
app = FastAPI(**kwargs)
102103

103-
self.add_routes_to_app(app, agent_card_url, rpc_url, extended_agent_card_url)
104+
self.add_routes_to_app(
105+
app, agent_card_url, rpc_url, extended_agent_card_url
106+
)
104107

105108
return app

src/a2a/server/apps/jsonrpc/starlette_app.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def add_routes_to_app(
9797
app: Starlette,
9898
agent_card_url: str = '/.well-known/agent.json',
9999
rpc_url: str = '/',
100-
extended_agent_card_url: str = '/agent/authenticatedExtendedCard'
100+
extended_agent_card_url: str = '/agent/authenticatedExtendedCard',
101101
) -> None:
102102
"""Adds the routes to the Starlette application.
103103
@@ -134,6 +134,8 @@ def build(
134134
"""
135135
app = Starlette(**kwargs)
136136

137-
self.add_routes_to_app(app, agent_card_url, rpc_url, extended_agent_card_url)
137+
self.add_routes_to_app(
138+
app, agent_card_url, rpc_url, extended_agent_card_url
139+
)
138140

139141
return app

0 commit comments

Comments
 (0)