INNER CODE UNIT · Python

_extract_marshmallow_field_params

Scille/umongo · src/umongo/abstract.py:180

    def _extract_marshmallow_field_params(self):
        params = {
            attribute: getattr(self, attribute)
            for attribute in (
                "validate",
                "required",
                "allow_none",
                "load_only",
                "dump_only",
                "error_messages",
            )
        }
        # Override uMongo attributes with marshmallow_ prefixed attributes
        params.update(self._ma_kwargs)
        return params

    def as_marshmallow_field(self):  # noqa: RET503 (no explicit return)
        """Return a pure-marshmallow version of this field"""

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…