MCPcopy Create free account
hub / github.com/dwavesystems/dwave-cloud-client / set

Method set

tests/api/mocks.py:362–373  ·  view source on GitHub ↗

Set `key` and `value` item in cache. When `read` is `True`, `value` should be a file-like object opened for reading in binary mode. Note: other diskcache arguments are ignored.

(self, key, value, read=False, **kwargs)

Source from the content-addressed store, hash-verified

360 return value
361
362 def set(self, key, value, read=False, **kwargs):
363 """Set `key` and `value` item in cache.
364
365 When `read` is `True`, `value` should be a file-like object opened
366 for reading in binary mode.
367
368 Note: other diskcache arguments are ignored.
369 """
370 if read:
371 value = value.read()
372 self[key] = value
373 return True

Callers 15

_input_config_variablesFunction · 0.80
_config_createFunction · 0.80
_signal_readyMethod · 0.80
_add_eventMethod · 0.80
wait_multipleMethod · 0.80
idMethod · 0.80
_load_resultMethod · 0.80
runMethod · 0.80
_update_cacheMethod · 0.80
test_id_integrationMethod · 0.80

Calls

no outgoing calls

Tested by 8

test_id_integrationMethod · 0.64
test_result_loadingMethod · 0.64
test_prioritizationMethod · 0.64
url_openMethod · 0.64
open_browserMethod · 0.64