MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / clear

Method clear

lib/sqlalchemy/event/attr.py:234–241  ·  view source on GitHub ↗

Clear all class level listeners

(self)

Source from the content-addressed store, hash-verified

232 registry._removed_from_collection(event_key, self)
233
234 def clear(self) -> None:
235 """Clear all class level listeners"""
236
237 to_clear: Set[_ListenerFnType] = set()
238 for dispatcher in self._clslevel.values():
239 to_clear.update(dispatcher)
240 dispatcher.clear()
241 registry._clear(self, to_clear)
242
243 def for_modify(self, obj: _Dispatch[_ET]) -> _ClsLevelDispatch[_ET]:
244 """Return an event collection which can be modified.

Callers

nothing calls this directly

Calls 4

valuesMethod · 0.45
updateMethod · 0.45
clearMethod · 0.45
_clearMethod · 0.45

Tested by

no test coverage detected