diff --git a/.github/actions/spelling/allow.txt b/.github/actions/spelling/allow.txt index d28188e3..d73260da 100644 --- a/.github/actions/spelling/allow.txt +++ b/.github/actions/spelling/allow.txt @@ -1,7 +1,10 @@ AError ARequest +AServer AStarlette adk +codegen +datamodel genai inmemory langgraph @@ -10,3 +13,4 @@ oauthoidc opensource socio sse +tagwords diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index df234019..9feb80f7 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -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, diff --git a/src/a2a/server/tasks/inmemory_task_store.py b/src/a2a/server/tasks/inmemory_task_store.py index a3d1b4c3..b3053e87 100644 --- a/src/a2a/server/tasks/inmemory_task_store.py +++ b/src/a2a/server/tasks/inmemory_task_store.py @@ -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 ) diff --git a/src/a2a/types.py b/src/a2a/types.py index cfff0d6e..e7dc4c91 100644 --- a/src/a2a/types.py +++ b/src/a2a/types.py @@ -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 diff --git a/src/a2a/utils/errors.py b/src/a2a/utils/errors.py index 3d2aca93..49cc7dab 100644 --- a/src/a2a/utils/errors.py +++ b/src/a2a/utils/errors.py @@ -15,7 +15,7 @@ class A2AServerError(Exception): - """Base exception for A2A Server errors.""" + """Base exception for A2A Server errors.""" class MethodNotImplementedError(A2AServerError): diff --git a/src/a2a/utils/helpers.py b/src/a2a/utils/helpers.py index c52497ec..2b5d2fe5 100644 --- a/src/a2a/utils/helpers.py +++ b/src/a2a/utils/helpers.py @@ -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}' ) @@ -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.' ) @@ -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) ) diff --git a/tests/server/tasks/test_inmemory_task_store.py b/tests/server/tasks/test_inmemory_task_store.py index 53a963ab..9eb8eae9 100644 --- a/tests/server/tasks/test_inmemory_task_store.py +++ b/tests/server/tasks/test_inmemory_task_store.py @@ -1,5 +1,7 @@ from typing import Any + import pytest + from a2a.server.tasks import InMemoryTaskStore from a2a.types import Task @@ -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 @@ -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') diff --git a/tests/server/tasks/test_task_manager.py b/tests/server/tasks/test_task_manager.py index cc3308f0..aae189fd 100644 --- a/tests/server/tasks/test_task_manager.py +++ b/tests/server/tasks/test_task_manager.py @@ -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, ) @@ -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 @@ -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,