Spaces:
Sleeping
Sleeping
Upload backend/venv/lib/python3.10/site-packages/marshmallow/base.py with huggingface_hub
dcbe3bf
verified
| """Abstract base classes. | |
| These are necessary to avoid circular imports between schema.py and fields.py. | |
| .. warning:: | |
| This module is deprecated. Users should not import from this module. | |
| Use `marshmallow.fields.Field` and `marshmallow.schema.Schema` as base classes instead. | |
| """ | |
| from __future__ import annotations | |
| from abc import ABC, abstractmethod | |
| class FieldABC(ABC): | |
| """Abstract base class from which all Field classes inherit.""" | |
| def serialize(self, attr, obj, accessor=None): | |
| pass | |
| def deserialize(self, value): | |
| pass | |
| def _serialize(self, value, attr, obj, **kwargs): | |
| pass | |
| def _deserialize(self, value, attr, data, **kwargs): | |
| pass | |
| class SchemaABC(ABC): | |
| """Abstract base class from which all Schemas inherit.""" | |
| def dump(self, obj, *, many: bool | None = None): | |
| pass | |
| def dumps(self, obj, *, many: bool | None = None): | |
| pass | |
| def load(self, data, *, many: bool | None = None, partial=None, unknown=None): | |
| pass | |
| def loads( | |
| self, | |
| json_data, | |
| *, | |
| many: bool | None = None, | |
| partial=None, | |
| unknown=None, | |
| **kwargs, | |
| ): | |
| pass | |