MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / coerce_to_immutabledict

Function coerce_to_immutabledict

lib/sqlalchemy/util/_collections.py:114–120  ·  view source on GitHub ↗
(d: Mapping[_KT, _VT])

Source from the content-addressed store, hash-verified

112
113
114def coerce_to_immutabledict(d: Mapping[_KT, _VT]) -> immutabledict[_KT, _VT]:
115 if not d:
116 return EMPTY_DICT
117 elif isinstance(d, immutabledict):
118 return d
119 else:
120 return immutabledict(d)
121
122
123EMPTY_DICT: immutabledict[Any, Any] = immutabledict()

Callers

nothing calls this directly

Calls 1

immutabledictClass · 0.90

Tested by

no test coverage detected