Skip to content

Commit 7c2972d

Browse files
committed
from instance to type
1 parent 36ebd8c commit 7c2972d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/a2a/utils/proto_utils.py

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

177-
if field.label == field.LABEL_REPEATED:
177+
if field.label == FieldDescriptor.LABEL_REPEATED:
178178
accumulated: list[Any] = []
179179
for v in v_list:
180180
if not v:
@@ -208,7 +208,7 @@ def _check_required_field_violation(
208208
) -> ValidationDetail | None:
209209
"""Check if a required field is missing or invalid."""
210210
val = getattr(msg, field.name)
211-
if field.label == field.LABEL_REPEATED:
211+
if field.label == FieldDescriptor.LABEL_REPEATED:
212212
if not val:
213213
return ValidationDetail(
214214
field=field.name,
@@ -249,7 +249,7 @@ def _recurse_validation(
249249
return errors
250250

251251
val = getattr(msg, field.name)
252-
if field.label != field.LABEL_REPEATED:
252+
if field.label != FieldDescriptor.LABEL_REPEATED:
253253
if msg.HasField(field.name):
254254
sub_errs = _validate_proto_required_fields_internal(val)
255255
_append_nested_errors(errors, field.name, sub_errs)

0 commit comments

Comments
 (0)