MCPcopy Create free account
hub / github.com/ModelTC/LightX2V / setdefault

Method setdefault

lightx2v/utils/lockable_dict.py:107–112  ·  view source on GitHub ↗
(self, key, default=None)

Source from the content-addressed store, hash-verified

105 return dict.popitem(self)
106
107 def setdefault(self, key, default=None):
108 # If key doesn't exist, setdefault will write, need to check lock
109 if key not in self:
110 self._ensure_unlocked()
111 default = self._wrap(default)
112 return dict.setdefault(self, key, default)
113
114 def update(self, other: Mapping | Iterable, **kwargs) -> None:
115 self._ensure_unlocked()

Callers 15

patched_from_pretrainedFunction · 0.80
pipeline.pyFile · 0.80
auto_calc_configFunction · 0.80
register_room_threadMethod · 0.80
_build_request_payloadFunction · 0.80
processMethod · 0.80
runMethod · 0.80
processMethod · 0.80
runMethod · 0.80
processMethod · 0.80
runMethod · 0.80

Calls 2

_ensure_unlockedMethod · 0.95
_wrapMethod · 0.95

Tested by

no test coverage detected