MCPcopy Create free account
hub / github.com/celery/celery / force_mapping

Function force_mapping

celery/utils/collections.py:39–44  ·  view source on GitHub ↗

Wrap object into supporting the mapping interface if necessary.

(m)

Source from the content-addressed store, hash-verified

37
38
39def force_mapping(m):
40 # type: (Any) -> Mapping
41 """Wrap object into supporting the mapping interface if necessary."""
42 if isinstance(m, (LazyObject, LazySettings)):
43 m = m._wrapped
44 return DictAttribute(m) if not isinstance(m, Mapping) else m
45
46
47def lpmerge(L, R):

Callers 2

config_from_objectMethod · 0.90
add_defaultsMethod · 0.85

Calls 1

DictAttributeClass · 0.85

Tested by

no test coverage detected