MCPcopy Index your code
hub / github.com/sqlalchemy/sqlalchemy / _reset_empty

Method _reset_empty

lib/sqlalchemy/orm/collections.py:511–518  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

509 self.owner_state._empty_collections[self._key] = user_data
510
511 def _reset_empty(self) -> None:
512 assert (
513 self.empty
514 ), "This collection adapter is not in the 'empty' state"
515 self.empty = False
516 self.owner_state.dict[self._key] = (
517 self.owner_state._empty_collections.pop(self._key)
518 )
519
520 def _refuse_empty(self) -> NoReturn:
521 raise sa_exc.InvalidRequestError(

Callers 6

fire_append_eventMethod · 0.95
fire_remove_eventMethod · 0.95
init_state_collectionFunction · 0.45

Calls 1

popMethod · 0.45

Tested by

no test coverage detected