modmex 1.2.4__tar.gz → 1.2.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {modmex-1.2.4 → modmex-1.2.5}/PKG-INFO +1 -1
- {modmex-1.2.4 → modmex-1.2.5}/modmex/validation.py +3 -0
- {modmex-1.2.4 → modmex-1.2.5}/pyproject.toml +1 -1
- {modmex-1.2.4 → modmex-1.2.5}/LICENSE +0 -0
- {modmex-1.2.4 → modmex-1.2.5}/README.md +0 -0
- {modmex-1.2.4 → modmex-1.2.5}/modmex/__init__.py +0 -0
- {modmex-1.2.4 → modmex-1.2.5}/modmex/__init__.pyi +0 -0
- {modmex-1.2.4 → modmex-1.2.5}/modmex/base_model.py +0 -0
- {modmex-1.2.4 → modmex-1.2.5}/modmex/base_model.pyi +0 -0
- {modmex-1.2.4 → modmex-1.2.5}/modmex/datetime_parser.py +0 -0
- {modmex-1.2.4 → modmex-1.2.5}/modmex/errors.py +0 -0
- {modmex-1.2.4 → modmex-1.2.5}/modmex/fields.py +0 -0
- {modmex-1.2.4 → modmex-1.2.5}/modmex/model_plans.py +0 -0
- {modmex-1.2.4 → modmex-1.2.5}/modmex/py.typed +0 -0
- {modmex-1.2.4 → modmex-1.2.5}/modmex/rust_backend.py +0 -0
- {modmex-1.2.4 → modmex-1.2.5}/modmex/serialization.py +0 -0
- {modmex-1.2.4 → modmex-1.2.5}/modmex/type_resolution.py +0 -0
- {modmex-1.2.4 → modmex-1.2.5}/modmex-core/Cargo.lock +0 -0
- {modmex-1.2.4 → modmex-1.2.5}/modmex-core/Cargo.toml +0 -0
- {modmex-1.2.4 → modmex-1.2.5}/modmex-core/src/coerce.rs +0 -0
- {modmex-1.2.4 → modmex-1.2.5}/modmex-core/src/lib.rs +0 -0
- {modmex-1.2.4 → modmex-1.2.5}/modmex-core/src/model_core.rs +0 -0
- {modmex-1.2.4 → modmex-1.2.5}/modmex-core/src/types.rs +0 -0
|
@@ -613,6 +613,9 @@ def _compile_constraints(field: dataclasses.Field[Any]) -> ConstraintValidators:
|
|
|
613
613
|
return ()
|
|
614
614
|
|
|
615
615
|
def validate_constraints(value: Any, loc: Loc) -> None:
|
|
616
|
+
# An optional field without a value has nothing to check: its type already allowed None.
|
|
617
|
+
if value is None:
|
|
618
|
+
return
|
|
616
619
|
if gt is not None and not value > gt:
|
|
617
620
|
raise _error(loc, f"must be > {gt}", "value_error.number.not_gt")
|
|
618
621
|
if ge is not None and not value >= ge:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|