Skip to content

Commit 51ec5e9

Browse files
committed
chore: fix inclusive language and spelling check failures
Signed-off-by: Luca Muscariello <muscariello@ieee.org>
1 parent f049d33 commit 51ec5e9

4 files changed

Lines changed: 39 additions & 34 deletions

File tree

.github/actions/spelling/allow.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,7 @@ tiangolo
100100
typ
101101
typeerror
102102
vulnz
103+
buf
104+
openapiv2
105+
swagger
106+
pydantic

.github/actions/spelling/excludes.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,4 @@ CHANGELOG.md
9090
^src/a2a/types/
9191
^tests/
9292
.pre-commit-config.yaml
93+
a2a.json

tests/server/apps/jsonrpc/test_jsonrpc_app.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def mark_pkg_starlette_not_installed(self):
140140
def test_create_jsonrpc_based_app_with_present_deps_succeeds(
141141
self, mock_app_params: dict
142142
):
143-
class DummyJSONRPCApp(JSONRPCApplication):
143+
class MockJSONRPCApp(JSONRPCApplication):
144144
def build(
145145
self,
146146
agent_card_url='/.well-known/agent.json',
@@ -150,7 +150,7 @@ def build(
150150
return object()
151151

152152
try:
153-
_app = DummyJSONRPCApp(**mock_app_params)
153+
_app = MockJSONRPCApp(**mock_app_params)
154154
except ImportError:
155155
pytest.fail(
156156
'With packages starlette and see-starlette present, creating a'
@@ -161,7 +161,7 @@ def build(
161161
def test_create_jsonrpc_based_app_with_missing_deps_raises_importerror(
162162
self, mock_app_params: dict, mark_pkg_starlette_not_installed: Any
163163
):
164-
class DummyJSONRPCApp(JSONRPCApplication):
164+
class MockJSONRPCApp(JSONRPCApplication):
165165
def build(
166166
self,
167167
agent_card_url='/.well-known/agent.json',
@@ -177,7 +177,7 @@ def build(
177177
' the `JSONRPCApplication`'
178178
),
179179
):
180-
_app = DummyJSONRPCApp(**mock_app_params)
180+
_app = MockJSONRPCApp(**mock_app_params)
181181

182182

183183
class TestJSONRPCExtensions:

tests/server/request_handlers/test_default_request_handler.py

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
)
6262

6363

64-
class DummyAgentExecutor(AgentExecutor):
64+
class MockAgentExecutor(AgentExecutor):
6565
async def execute(self, context: RequestContext, event_queue: EventQueue):
6666
task_updater = TaskUpdater(
6767
event_queue, context.task_id, context.context_id
@@ -108,7 +108,7 @@ def create_server_call_context() -> ServerCallContext:
108108

109109
def test_init_default_dependencies():
110110
"""Test that default dependencies are created if not provided."""
111-
agent_executor = DummyAgentExecutor()
111+
agent_executor = MockAgentExecutor()
112112
task_store = InMemoryTaskStore()
113113

114114
handler = DefaultRequestHandler(
@@ -135,7 +135,7 @@ async def test_on_get_task_not_found():
135135
mock_task_store.get.return_value = None
136136

137137
request_handler = DefaultRequestHandler(
138-
agent_executor=DummyAgentExecutor(), task_store=mock_task_store
138+
agent_executor=MockAgentExecutor(), task_store=mock_task_store
139139
)
140140

141141
params = GetTaskRequest(name='tasks/non_existent_task')
@@ -157,7 +157,7 @@ async def test_on_cancel_task_task_not_found():
157157
mock_task_store.get.return_value = None
158158

159159
request_handler = DefaultRequestHandler(
160-
agent_executor=DummyAgentExecutor(), task_store=mock_task_store
160+
agent_executor=MockAgentExecutor(), task_store=mock_task_store
161161
)
162162
params = CancelTaskRequest(name='tasks/task_not_found_for_cancel')
163163

@@ -1820,7 +1820,7 @@ async def test_cleanup_producer_task_id_not_in_running_agents():
18201820
mock_task_store = AsyncMock(spec=TaskStore)
18211821
mock_queue_manager = AsyncMock(spec=QueueManager)
18221822
request_handler = DefaultRequestHandler(
1823-
agent_executor=DummyAgentExecutor(),
1823+
agent_executor=MockAgentExecutor(),
18241824
task_store=mock_task_store,
18251825
queue_manager=mock_queue_manager,
18261826
)
@@ -1855,7 +1855,7 @@ async def noop_coro_for_task():
18551855
async def test_set_task_push_notification_config_no_notifier():
18561856
"""Test on_set_task_push_notification_config when _push_config_store is None."""
18571857
request_handler = DefaultRequestHandler(
1858-
agent_executor=DummyAgentExecutor(),
1858+
agent_executor=MockAgentExecutor(),
18591859
task_store=AsyncMock(spec=TaskStore),
18601860
push_config_store=None, # Explicitly None
18611861
)
@@ -1886,7 +1886,7 @@ async def test_set_task_push_notification_config_task_not_found():
18861886
mock_push_sender = AsyncMock(spec=PushNotificationSender)
18871887

18881888
request_handler = DefaultRequestHandler(
1889-
agent_executor=DummyAgentExecutor(),
1889+
agent_executor=MockAgentExecutor(),
18901890
task_store=mock_task_store,
18911891
push_config_store=mock_push_store,
18921892
push_sender=mock_push_sender,
@@ -1917,7 +1917,7 @@ async def test_set_task_push_notification_config_task_not_found():
19171917
async def test_get_task_push_notification_config_no_store():
19181918
"""Test on_get_task_push_notification_config when _push_config_store is None."""
19191919
request_handler = DefaultRequestHandler(
1920-
agent_executor=DummyAgentExecutor(),
1920+
agent_executor=MockAgentExecutor(),
19211921
task_store=AsyncMock(spec=TaskStore),
19221922
push_config_store=None, # Explicitly None
19231923
)
@@ -1941,7 +1941,7 @@ async def test_get_task_push_notification_config_task_not_found():
19411941
mock_push_store = AsyncMock(spec=PushNotificationConfigStore)
19421942

19431943
request_handler = DefaultRequestHandler(
1944-
agent_executor=DummyAgentExecutor(),
1944+
agent_executor=MockAgentExecutor(),
19451945
task_store=mock_task_store,
19461946
push_config_store=mock_push_store,
19471947
)
@@ -1973,7 +1973,7 @@ async def test_get_task_push_notification_config_info_not_found():
19731973
mock_push_store.get_info.return_value = None # Info not found
19741974

19751975
request_handler = DefaultRequestHandler(
1976-
agent_executor=DummyAgentExecutor(),
1976+
agent_executor=MockAgentExecutor(),
19771977
task_store=mock_task_store,
19781978
push_config_store=mock_push_store,
19791979
)
@@ -2004,7 +2004,7 @@ async def test_get_task_push_notification_config_info_with_config():
20042004
push_store = InMemoryPushNotificationConfigStore()
20052005

20062006
request_handler = DefaultRequestHandler(
2007-
agent_executor=DummyAgentExecutor(),
2007+
agent_executor=MockAgentExecutor(),
20082008
task_store=mock_task_store,
20092009
push_config_store=push_store,
20102010
)
@@ -2051,7 +2051,7 @@ async def test_get_task_push_notification_config_info_with_config_no_id():
20512051
push_store = InMemoryPushNotificationConfigStore()
20522052

20532053
request_handler = DefaultRequestHandler(
2054-
agent_executor=DummyAgentExecutor(),
2054+
agent_executor=MockAgentExecutor(),
20552055
task_store=mock_task_store,
20562056
push_config_store=push_store,
20572057
)
@@ -2095,7 +2095,7 @@ async def test_on_subscribe_to_task_task_not_found():
20952095
mock_task_store.get.return_value = None # Task not found
20962096

20972097
request_handler = DefaultRequestHandler(
2098-
agent_executor=DummyAgentExecutor(), task_store=mock_task_store
2098+
agent_executor=MockAgentExecutor(), task_store=mock_task_store
20992099
)
21002100
params = SubscribeToTaskRequest(name='tasks/resub_task_not_found')
21012101

@@ -2124,7 +2124,7 @@ async def test_on_subscribe_to_task_queue_not_found():
21242124
mock_queue_manager.tap.return_value = None # Queue not found
21252125

21262126
request_handler = DefaultRequestHandler(
2127-
agent_executor=DummyAgentExecutor(),
2127+
agent_executor=MockAgentExecutor(),
21282128
task_store=mock_task_store,
21292129
queue_manager=mock_queue_manager,
21302130
)
@@ -2149,7 +2149,7 @@ async def test_on_subscribe_to_task_queue_not_found():
21492149
@pytest.mark.asyncio
21502150
async def test_on_message_send_stream():
21512151
request_handler = DefaultRequestHandler(
2152-
DummyAgentExecutor(), InMemoryTaskStore()
2152+
MockAgentExecutor(), InMemoryTaskStore()
21532153
)
21542154
message_params = SendMessageRequest(
21552155
message=Message(
@@ -2187,7 +2187,7 @@ async def consume_stream():
21872187
async def test_list_task_push_notification_config_no_store():
21882188
"""Test on_list_task_push_notification_config when _push_config_store is None."""
21892189
request_handler = DefaultRequestHandler(
2190-
agent_executor=DummyAgentExecutor(),
2190+
agent_executor=MockAgentExecutor(),
21912191
task_store=AsyncMock(spec=TaskStore),
21922192
push_config_store=None, # Explicitly None
21932193
)
@@ -2209,7 +2209,7 @@ async def test_list_task_push_notification_config_task_not_found():
22092209
mock_push_store = AsyncMock(spec=PushNotificationConfigStore)
22102210

22112211
request_handler = DefaultRequestHandler(
2212-
agent_executor=DummyAgentExecutor(),
2212+
agent_executor=MockAgentExecutor(),
22132213
task_store=mock_task_store,
22142214
push_config_store=mock_push_store,
22152215
)
@@ -2240,7 +2240,7 @@ async def test_list_no_task_push_notification_config_info():
22402240
push_store = InMemoryPushNotificationConfigStore()
22412241

22422242
request_handler = DefaultRequestHandler(
2243-
agent_executor=DummyAgentExecutor(),
2243+
agent_executor=MockAgentExecutor(),
22442244
task_store=mock_task_store,
22452245
push_config_store=push_store,
22462246
)
@@ -2274,7 +2274,7 @@ async def test_list_task_push_notification_config_info_with_config():
22742274
await push_store.set_info('task_1', push_config2)
22752275

22762276
request_handler = DefaultRequestHandler(
2277-
agent_executor=DummyAgentExecutor(),
2277+
agent_executor=MockAgentExecutor(),
22782278
task_store=mock_task_store,
22792279
push_config_store=push_store,
22802280
)
@@ -2300,7 +2300,7 @@ async def test_list_task_push_notification_config_info_with_config_and_no_id():
23002300
push_store = InMemoryPushNotificationConfigStore()
23012301

23022302
request_handler = DefaultRequestHandler(
2303-
agent_executor=DummyAgentExecutor(),
2303+
agent_executor=MockAgentExecutor(),
23042304
task_store=mock_task_store,
23052305
push_config_store=push_store,
23062306
)
@@ -2351,7 +2351,7 @@ async def test_list_task_push_notification_config_info_with_config_and_no_id():
23512351
async def test_delete_task_push_notification_config_no_store():
23522352
"""Test on_delete_task_push_notification_config when _push_config_store is None."""
23532353
request_handler = DefaultRequestHandler(
2354-
agent_executor=DummyAgentExecutor(),
2354+
agent_executor=MockAgentExecutor(),
23552355
task_store=AsyncMock(spec=TaskStore),
23562356
push_config_store=None, # Explicitly None
23572357
)
@@ -2375,7 +2375,7 @@ async def test_delete_task_push_notification_config_task_not_found():
23752375
mock_push_store = AsyncMock(spec=PushNotificationConfigStore)
23762376

23772377
request_handler = DefaultRequestHandler(
2378-
agent_executor=DummyAgentExecutor(),
2378+
agent_executor=MockAgentExecutor(),
23792379
task_store=mock_task_store,
23802380
push_config_store=mock_push_store,
23812381
)
@@ -2410,7 +2410,7 @@ async def test_delete_no_task_push_notification_config_info():
24102410
)
24112411

24122412
request_handler = DefaultRequestHandler(
2413-
agent_executor=DummyAgentExecutor(),
2413+
agent_executor=MockAgentExecutor(),
24142414
task_store=mock_task_store,
24152415
push_config_store=push_store,
24162416
)
@@ -2454,7 +2454,7 @@ async def test_delete_task_push_notification_config_info_with_config():
24542454
await push_store.set_info('task_2', push_config1)
24552455

24562456
request_handler = DefaultRequestHandler(
2457-
agent_executor=DummyAgentExecutor(),
2457+
agent_executor=MockAgentExecutor(),
24582458
task_store=mock_task_store,
24592459
push_config_store=push_store,
24602460
)
@@ -2494,7 +2494,7 @@ async def test_delete_task_push_notification_config_info_with_config_and_no_id()
24942494
await push_store.set_info('task_1', push_config)
24952495

24962496
request_handler = DefaultRequestHandler(
2497-
agent_executor=DummyAgentExecutor(),
2497+
agent_executor=MockAgentExecutor(),
24982498
task_store=mock_task_store,
24992499
push_config_store=push_store,
25002500
)
@@ -2540,7 +2540,7 @@ async def test_on_message_send_task_in_terminal_state(terminal_state):
25402540
# So we should patch that instead.
25412541

25422542
request_handler = DefaultRequestHandler(
2543-
agent_executor=DummyAgentExecutor(), task_store=mock_task_store
2543+
agent_executor=MockAgentExecutor(), task_store=mock_task_store
25442544
)
25452545

25462546
params = SendMessageRequest(
@@ -2585,7 +2585,7 @@ async def test_on_message_send_stream_task_in_terminal_state(terminal_state):
25852585
mock_task_store = AsyncMock(spec=TaskStore)
25862586

25872587
request_handler = DefaultRequestHandler(
2588-
agent_executor=DummyAgentExecutor(), task_store=mock_task_store
2588+
agent_executor=MockAgentExecutor(), task_store=mock_task_store
25892589
)
25902590

25912591
params = SendMessageRequest(
@@ -2631,7 +2631,7 @@ async def test_on_subscribe_to_task_in_terminal_state(terminal_state):
26312631
mock_task_store.get.return_value = terminal_task
26322632

26332633
request_handler = DefaultRequestHandler(
2634-
agent_executor=DummyAgentExecutor(),
2634+
agent_executor=MockAgentExecutor(),
26352635
task_store=mock_task_store,
26362636
queue_manager=AsyncMock(spec=QueueManager),
26372637
)
@@ -2660,7 +2660,7 @@ async def test_on_message_send_task_id_provided_but_task_not_found():
26602660
mock_task_store = AsyncMock(spec=TaskStore)
26612661

26622662
request_handler = DefaultRequestHandler(
2663-
agent_executor=DummyAgentExecutor(), task_store=mock_task_store
2663+
agent_executor=MockAgentExecutor(), task_store=mock_task_store
26642664
)
26652665

26662666
params = SendMessageRequest(
@@ -2700,7 +2700,7 @@ async def test_on_message_send_stream_task_id_provided_but_task_not_found():
27002700
mock_task_store = AsyncMock(spec=TaskStore)
27012701

27022702
request_handler = DefaultRequestHandler(
2703-
agent_executor=DummyAgentExecutor(), task_store=mock_task_store
2703+
agent_executor=MockAgentExecutor(), task_store=mock_task_store
27042704
)
27052705

27062706
params = SendMessageRequest(

0 commit comments

Comments
 (0)