File tree Expand file tree Collapse file tree 4 files changed +24
-13
lines changed
Expand file tree Collapse file tree 4 files changed +24
-13
lines changed Original file line number Diff line number Diff line change @@ -114,9 +114,15 @@ def format(session):
114114 'pyupgrade' ,
115115 'autoflake' ,
116116 'ruff' ,
117+ 'no_implicit_optional' ,
117118 )
118119
119120 if lint_paths_py :
121+ session .run (
122+ 'no_implicit_optional' ,
123+ '--use-union-or' ,
124+ * lint_paths_py ,
125+ )
120126 if not format_all :
121127 session .run (
122128 'pyupgrade' ,
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ def completed_task(
1818 task_id : str ,
1919 context_id : str ,
2020 artifacts : list [Artifact ],
21- history : list [Message ] = None ,
21+ history : list [Message ] | None = None ,
2222) -> Task :
2323 if history is None :
2424 history = []
Original file line number Diff line number Diff line change 11from typing import Any
2+
23import pytest
3- from a2a .utils .helpers import (
4- create_task_obj ,
5- append_artifact_to_task ,
6- build_text_artifact ,
7- validate ,
8- )
4+
95from a2a .types import (
106 Artifact ,
11- MessageSendParams ,
127 Message ,
8+ MessageSendParams ,
9+ Part ,
1310 Task ,
1411 TaskArtifactUpdateEvent ,
1512 TaskState ,
1613 TextPart ,
17- Part ,
1814)
1915from a2a .utils .errors import ServerError
16+ from a2a .utils .helpers import (
17+ append_artifact_to_task ,
18+ build_text_artifact ,
19+ create_task_obj ,
20+ validate ,
21+ )
22+
2023
2124# --- Helper Data ---
2225TEXT_PART_DATA : dict [str , Any ] = {'type' : 'text' , 'text' : 'Hello' }
Original file line number Diff line number Diff line change 1- import pytest
21import asyncio
2+
33from unittest import mock
4- from a2a .utils .telemetry import trace_function , trace_class
4+
5+ import pytest
6+
7+ from a2a .utils .telemetry import trace_class , trace_function
58
69
710@pytest .fixture
811def mock_span ():
9- span = mock .MagicMock ()
10- return span
12+ return mock .MagicMock ()
1113
1214
1315@pytest .fixture
You can’t perform that action at this time.
0 commit comments