Skip to content

fix: correcting typos in various files #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/actions/spelling/allow.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
AError
ARequest
AServer
AStarlette
adk
codegen
datamodel
genai
inmemory
langgraph
Expand All @@ -10,3 +13,4 @@ oauthoidc
opensource
socio
sse
tagwords
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
contributors and maintainers pledge to make participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of
experience, education, socio-economic status, nationality, personal appearance,
Expand Down
2 changes: 1 addition & 1 deletion src/a2a/server/tasks/inmemory_task_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ async def delete(self, task_id: str) -> None:
logger.info('Task %s deleted successfully.', task_id)
else:
logger.warning(
'Attempted to delete non-existent task with id: %s', task_id
'Attempted to delete nonexistent task with id: %s', task_id
)
2 changes: 1 addition & 1 deletion src/a2a/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,7 @@ class SetTaskPushNotificationConfigSuccessResponse(BaseModel):

class Artifact(BaseModel):
"""
Represents an artifact generated for a task task.
Represents an artifact generated for a task.
"""

artifactId: str
Expand Down
2 changes: 1 addition & 1 deletion src/a2a/utils/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@


class A2AServerError(Exception):
"""Base exception for A2A Server errors."""
"""Base exception for A2A Server errors."""


class MethodNotImplementedError(A2AServerError):
Expand Down
6 changes: 3 additions & 3 deletions src/a2a/utils/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def append_artifact_to_task(task: Task, event: TaskArtifactUpdateEvent) -> None:
)
task.artifacts.append(new_artifact_data)
elif existing_artifact:
# Append new parts to the existing artifact's parts list
# Append new parts to the existing artifact's part list
logger.debug(
f'Appending parts to artifact id {artifact_id} for task {task.id}'
)
Expand All @@ -74,7 +74,7 @@ def append_artifact_to_task(task: Task, event: TaskArtifactUpdateEvent) -> None:
# We received a chunk to append, but we don't have an existing artifact.
# we will ignore this chunk
logger.warning(
f'Received append=True for non-existent artifact index {artifact_id} in task {task.id}. Ignoring chunk.'
f'Received append=True for nonexistent artifact index {artifact_id} in task {task.id}. Ignoring chunk.'
)


Expand All @@ -93,7 +93,7 @@ def wrapper(self, *args, **kwargs):
if not expression(self):
if not error_message:
message = str(expression)
logger.error(f'Unsuppported Operation: {error_message}')
logger.error(f'Unsupported Operation: {error_message}')
raise ServerError(
UnsupportedOperationError(message=error_message)
)
Expand Down
6 changes: 4 additions & 2 deletions tests/server/tasks/test_inmemory_task_store.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from typing import Any

import pytest

from a2a.server.tasks import InMemoryTaskStore
from a2a.types import Task

Expand All @@ -24,7 +26,7 @@ async def test_in_memory_task_store_save_and_get() -> None:

@pytest.mark.asyncio
async def test_in_memory_task_store_get_nonexistent() -> None:
"""Test retrieving a non-existent task."""
"""Test retrieving a nonexistent task."""
store = InMemoryTaskStore()
retrieved_task = await store.get('nonexistent')
assert retrieved_task is None
Expand All @@ -43,6 +45,6 @@ async def test_in_memory_task_store_delete() -> None:

@pytest.mark.asyncio
async def test_in_memory_task_store_delete_nonexistent() -> None:
"""Test deleting a non-existent task."""
"""Test deleting a nonexistent task."""
store = InMemoryTaskStore()
await store.delete('nonexistent')
14 changes: 8 additions & 6 deletions tests/server/tasks/test_task_manager.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
from typing import Any
from unittest.mock import AsyncMock

import pytest

from a2a.server.tasks import TaskManager
from a2a.types import (
Artifact,
Message,
Part,
Role,
Task,
TaskArtifactUpdateEvent,
TaskState,
TaskStatus,
TaskStatusUpdateEvent,
Message,
Role,
Part,
TextPart,
Artifact,
)


Expand Down Expand Up @@ -57,7 +59,7 @@ async def test_get_task_existing(
async def test_get_task_nonexistent(
task_manager: TaskManager, mock_task_store: AsyncMock
) -> None:
"""Test getting a non-existent task."""
"""Test getting a nonexistent task."""
mock_task_store.get.return_value = None
retrieved_task = await task_manager.get_task()
assert retrieved_task is None
Expand Down Expand Up @@ -146,7 +148,7 @@ async def test_ensure_task_existing(
async def test_ensure_task_nonexistent(
mock_task_store: AsyncMock,
) -> None:
"""Test ensuring a non-existent task (creates a new one)."""
"""Test ensuring a nonexistent task (creates a new one)."""
mock_task_store.get.return_value = None
task_manager_without_id = TaskManager(
task_id=None,
Expand Down