Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
… into jchadwick/structured-field-paths
  • Loading branch information
jchadwick-buf committed Nov 25, 2024
2 parents e3bc41a + aa8f250 commit 47775ea
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 25 deletions.
44 changes: 22 additions & 22 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion protovalidate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
validate = _validator.validate
collect_violations = _validator.collect_violations

__all__ = ["Validator", "CompilationError", "ValidationError", "Violations", "validate", "collect_violations"]
__all__ = ["CompilationError", "ValidationError", "Validator", "Violations", "collect_violations", "validate"]
6 changes: 4 additions & 2 deletions protovalidate/internal/constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,10 @@ def __init__(
self._ignore_empty = (
field_level.ignore_empty
or field_level.ignore in (validate_pb2.IGNORE_IF_UNPOPULATED, validate_pb2.IGNORE_IF_DEFAULT_VALUE)
or field.has_presence # type: ignore[attr-defined]
and not for_items
or (
field.has_presence # type: ignore[attr-defined]
and not for_items
)
)
self._ignore_default = field.has_presence and field_level.ignore == validate_pb2.IGNORE_IF_DEFAULT_VALUE # type: ignore[attr-defined]
self._required = field_level.required
Expand Down

0 comments on commit 47775ea

Please sign in to comment.