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

Class MetaDict

mongoengine/base/metaclasses.py:450–462  ·  view source on GitHub ↗

Custom dictionary for meta classes. Handles the merging of set indexes

Source from the content-addressed store, hash-verified

448
449
450class MetaDict(dict):
451 """Custom dictionary for meta classes.
452 Handles the merging of set indexes
453 """
454
455 _merge_options = ("indexes",)
456
457 def merge(self, new_options):
458 for k, v in new_options.items():
459 if k in self._merge_options:
460 self[k] = self.get(k, []) + v
461 else:
462 self[k] = v
463
464
465class BasesTuple(tuple):

Callers 2

__new__Method · 0.85
__new__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…