MCPcopy Create free account
hub / github.com/MongoEngine/mongoengine / __init__

Method __init__

mongoengine/base/fields.py:314–320  ·  view source on GitHub ↗
(self, field=None, **kwargs)

Source from the content-addressed store, hash-verified

312 """
313
314 def __init__(self, field=None, **kwargs):
315 if field is not None and not isinstance(field, BaseField):
316 raise TypeError(
317 f"field argument must be a Field instance (e.g {self.__class__.__name__}(StringField()))"
318 )
319 self.field = field
320 super().__init__(**kwargs)
321
322 @staticmethod
323 def _lazy_load_refs(instance, name, ref_values, *, max_depth):

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected