Skip to content

Commit 8affcb3

Browse files
committed
refactor: Rename CallInterceptor to ClientCallInterceptor and simplify default list assignments in the Client constructor.
1 parent f379679 commit 8affcb3

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

src/a2a/client/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@
3636
'AgentCardResolutionError',
3737
'AuthInterceptor',
3838
'BaseClient',
39-
'CallInterceptor',
4039
'Client',
4140
'ClientCallContext',
41+
'ClientCallInterceptor',
4242
'ClientConfig',
4343
'ClientEvent',
4444
'ClientFactory',

src/a2a/client/client.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,8 @@ def __init__(
115115
consumers: A list of callables to process events from the agent.
116116
interceptors: A list of interceptors to process requests and responses.
117117
"""
118-
if interceptors is None:
119-
interceptors = []
120-
if consumers is None:
121-
consumers = []
122-
self._consumers = consumers
123-
self._interceptors = interceptors
118+
self._consumers = consumers or []
119+
self._interceptors = interceptors or []
124120

125121
async def __aenter__(self) -> Self:
126122
"""Enters the async context manager."""

0 commit comments

Comments
 (0)