Skip to content

Commit 47775ea

Browse files
author
John Chadwick
committed
Merge branch 'main' of https://github.com/bufbuild/protovalidate-python into jchadwick/structured-field-paths
2 parents e3bc41a + aa8f250 commit 47775ea

File tree

3 files changed

+27
-25
lines changed

3 files changed

+27
-25
lines changed

Pipfile.lock

Lines changed: 22 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

protovalidate/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@
2323
validate = _validator.validate
2424
collect_violations = _validator.collect_violations
2525

26-
__all__ = ["Validator", "CompilationError", "ValidationError", "Violations", "validate", "collect_violations"]
26+
__all__ = ["CompilationError", "ValidationError", "Validator", "Violations", "collect_violations", "validate"]

protovalidate/internal/constraints.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,10 @@ def __init__(
424424
self._ignore_empty = (
425425
field_level.ignore_empty
426426
or field_level.ignore in (validate_pb2.IGNORE_IF_UNPOPULATED, validate_pb2.IGNORE_IF_DEFAULT_VALUE)
427-
or field.has_presence # type: ignore[attr-defined]
428-
and not for_items
427+
or (
428+
field.has_presence # type: ignore[attr-defined]
429+
and not for_items
430+
)
429431
)
430432
self._ignore_default = field.has_presence and field_level.ignore == validate_pb2.IGNORE_IF_DEFAULT_VALUE # type: ignore[attr-defined]
431433
self._required = field_level.required

0 commit comments

Comments
 (0)