Skip to content

Commit 8d9bc2b

Browse files
committed
todo comment
1 parent 7c2972d commit 8d9bc2b

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/a2a/utils/proto_utils.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,9 @@ def parse_params(params: QueryParams, message: ProtobufMessage) -> None:
174174
field = fields[k]
175175
v_list = params.getlist(k)
176176

177+
# TODO(https://github.com/a2aproject/a2a-python/issues/1011):
178+
# Replace deprecated `field.label` with `field.is_repeated` once the
179+
# minimum protobuf version requirement is bumped.
177180
if field.label == FieldDescriptor.LABEL_REPEATED:
178181
accumulated: list[Any] = []
179182
for v in v_list:
@@ -208,6 +211,9 @@ def _check_required_field_violation(
208211
) -> ValidationDetail | None:
209212
"""Check if a required field is missing or invalid."""
210213
val = getattr(msg, field.name)
214+
# TODO(https://github.com/a2aproject/a2a-python/issues/1011):
215+
# Replace deprecated `field.label` with `field.is_repeated` once the
216+
# minimum protobuf version requirement is bumped.
211217
if field.label == FieldDescriptor.LABEL_REPEATED:
212218
if not val:
213219
return ValidationDetail(
@@ -249,6 +255,9 @@ def _recurse_validation(
249255
return errors
250256

251257
val = getattr(msg, field.name)
258+
# TODO(https://github.com/a2aproject/a2a-python/issues/1011):
259+
# Replace deprecated `field.label` with `field.is_repeated` once the
260+
# minimum protobuf version requirement is bumped.
252261
if field.label != FieldDescriptor.LABEL_REPEATED:
253262
if msg.HasField(field.name):
254263
sub_errs = _validate_proto_required_fields_internal(val)

0 commit comments

Comments
 (0)