MCPcopy Create free account
hub / github.com/HypothesisWorks/hypothesis / move

Method move

hypothesis/src/hypothesis/database.py:253–267  ·  view source on GitHub ↗

Move ``value`` from key ``src`` to key ``dest``. Equivalent to ``delete(src, value)`` followed by ``save(src, value)``, but may have a more efficient implementation. Note that ``value`` will be inserted at ``dest`` regardless of whether it is currently pres

(self, src: bytes, dest: bytes, value: bytes)

Source from the content-addressed store, hash-verified

251 raise NotImplementedError(f"{type(self).__name__}.delete")
252
253 def move(self, src: bytes, dest: bytes, value: bytes) -> None:
254 """
255 Move ``value`` from key ``src`` to key ``dest``.
256
257 Equivalent to ``delete(src, value)`` followed by ``save(src, value)``,
258 but may have a more efficient implementation.
259
260 Note that ``value`` will be inserted at ``dest`` regardless of whether
261 it is currently present at ``src``.
262 """
263 if src == dest:
264 self.save(src, value)
265 return
266 self.delete(src, value)
267 self.save(dest, value)
268
269 def add_listener(self, f: ListenerT, /) -> None:
270 """

Callers 1

moveMethod · 0.45

Calls 2

saveMethod · 0.95
deleteMethod · 0.95

Tested by

no test coverage detected