(d: Mapping[_KT, _VT])
| 112 | |
| 113 | |
| 114 | def 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 | |
| 123 | EMPTY_DICT: immutabledict[Any, Any] = immutabledict() |
nothing calls this directly
no test coverage detected