Skip to content

Commit 4e28eb7

Browse files
authored
Remove/update some TODO comments (#2731)
1 parent 7615bf4 commit 4e28eb7

File tree

6 files changed

+4
-12
lines changed

6 files changed

+4
-12
lines changed

pydantic_ai_slim/pydantic_ai/messages.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -966,7 +966,7 @@ def new_event_body():
966966
body.setdefault('tool_calls', []).append(
967967
{
968968
'id': part.tool_call_id,
969-
'type': 'function', # TODO https://github.com/pydantic/pydantic-ai/issues/888
969+
'type': 'function',
970970
'function': {
971971
'name': part.tool_name,
972972
**({'arguments': part.args} if settings.include_content else {}),

pydantic_ai_slim/pydantic_ai/models/gemini.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,6 @@ def _part_discriminator(v: Any) -> str:
735735

736736
# See <https://ai.google.dev/api/caching#Part>
737737
# we don't currently support other part types
738-
# TODO discriminator
739738
_GeminiPartUnion = Annotated[
740739
Annotated[_GeminiTextPart, pydantic.Tag('text')]
741740
| Annotated[_GeminiFunctionCallPart, pydantic.Tag('function_call')]

pydantic_evals/pydantic_evals/dataset.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,6 @@ def __init__(
161161
self.evaluators = list(evaluators)
162162

163163

164-
# TODO: Consider making one or more of the following changes to this type:
165-
# * Add `task: Callable[[InputsT], Awaitable[OutputT]` as a field
166-
# * Add `inputs_type`, `output_type`, etc. as kwargs on `__init__`
167-
# * Rename to `Evaluation`
168-
# TODO: Allow `task` to be sync _or_ async
169164
class Dataset(BaseModel, Generic[InputsT, OutputT, MetadataT], extra='forbid', arbitrary_types_allowed=True):
170165
"""A dataset of test [cases][pydantic_evals.Case].
171166
@@ -634,7 +629,7 @@ def model_json_schema_with_evaluators(
634629
def _make_typed_dict(cls_name_prefix: str, fields: dict[str, Any]) -> Any:
635630
td = TypedDict(f'{cls_name_prefix}_{name}', fields) # pyright: ignore[reportArgumentType]
636631
config = ConfigDict(extra='forbid', arbitrary_types_allowed=True)
637-
# TODO: Replace with pydantic.with_config after pydantic 2.11 is released
632+
# TODO: Replace with pydantic.with_config once pydantic 2.11 is the min supported version
638633
td.__pydantic_config__ = config # pyright: ignore[reportAttributeAccessIssue]
639634
return td
640635

@@ -859,7 +854,6 @@ async def _run_task(
859854
for k, v in node.attributes.items():
860855
if not isinstance(v, int | float):
861856
continue
862-
# TODO: Revisit this choice to strip the prefix..
863857
if k.startswith('gen_ai.usage.details.'):
864858
task_run.increment_metric(k.removeprefix('gen_ai.usage.details.'), v)
865859
elif k.startswith('gen_ai.usage.'):

pydantic_evals/pydantic_evals/evaluators/evaluator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class EvaluationReason:
5555
"""Type for the output of an evaluator, which can be a scalar, an EvaluationReason, or a mapping of names to either."""
5656

5757

58-
# TODO(DavidM): Add bound=EvaluationScalar to the following typevar after we upgrade to pydantic 2.11
58+
# TODO(DavidM): Add bound=EvaluationScalar to the following typevar once pydantic 2.11 is the min supported version
5959
EvaluationScalarT = TypeVar('EvaluationScalarT', default=EvaluationScalar, covariant=True)
6060
"""Type variable for the scalar result type of an evaluation."""
6161

pydantic_evals/pydantic_evals/evaluators/spec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
if TYPE_CHECKING:
1818
# This import seems to fail on Pydantic 2.10.1 in CI
1919
from pydantic import ModelWrapValidatorHandler
20-
# TODO: Try removing this when we update to pydantic 2.11
20+
# TODO: Remove this once pydantic 2.11 is the min supported version
2121

2222

2323
class EvaluatorSpec(BaseModel):

pydantic_graph/pydantic_graph/nodes.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ def get_node_def(cls, local_ns: dict[str, Any] | None) -> NodeDef[StateT, DepsT,
121121
if return_type_origin is End:
122122
end_edge = edge
123123
elif return_type_origin is BaseNode:
124-
# TODO: Should we disallow this?
125124
returns_base_node = True
126125
elif issubclass(return_type_origin, BaseNode):
127126
next_node_edges[return_type.get_node_id()] = edge

0 commit comments

Comments
 (0)