MCPcopy Index your code
hub / github.com/MongoEngine/mongoengine / generate_key

Method generate_key

mongoengine/errors.py:147–154  ·  view source on GitHub ↗
(value, prefix="")

Source from the content-addressed store, hash-verified

145 """Returns a string listing all errors within a document"""
146
147 def generate_key(value, prefix=""):
148 if isinstance(value, list):
149 value = " ".join([generate_key(k) for k in value])
150 elif isinstance(value, dict):
151 value = " ".join([generate_key(v, k) for k, v in value.items()])
152
153 results = f"{prefix}.{value}" if prefix else value
154 return results
155
156 error_dict = defaultdict(list)
157 for k, v in self.to_dict().items():

Callers

nothing calls this directly

Calls 2

joinMethod · 0.80
itemsMethod · 0.80

Tested by

no test coverage detected