You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 27, 2026. It is now read-only.
# Validates RequestMessage
def generate_validate(p):
if p.some_string_field:
try:
uuid.UUID(p.some_string_field)
except ValueError:
raise ValidationFailed("p.some_string_field is not a valid UUID")
if p.other_string_field_no_validation:
return None
File "/app/app/service.py", line 724, in FindCard
validate(proto_message=request)
File "/usr/local/lib/python3.9/site-packages/protoc_gen_validate/validator.py", line 57, in validate
return _validate_inner(ValidatingMessage(proto_message))(proto_message)
File "/usr/local/lib/python3.9/site-packages/protoc_gen_validate/validator.py", line 66, in _validate_inner
exec(func)
File "<string>", line 18
return None
^
IndentationError: expected an indented block
I didn't see any docs indicating the validation would raise an exception if ignore_empty wasn't placed alongside an actual validation rule. Not sure on the lift here to simply ignore generating the python code template for fields that express ignore empty without validation rules.
Version:
protoc-gen-validate = "^0.10.1"I didn't see any docs indicating the validation would raise an exception if ignore_empty wasn't placed alongside an actual validation rule. Not sure on the lift here to simply ignore generating the python code template for fields that express ignore empty without validation rules.
Could we just make these indented
passfor instead of returningNone?