MCPcopy Index your code
hub / github.com/LabPy/lantz / update

Method update

lantz/driver.py:365–381  ·  view source on GitHub ↗

Update driver. :param newstate: a dictionary containing the new driver state. :type newstate: dict. :param force: apply change even when the cache says it is not necessary. :param force: boolean. :raises: ValueError if called with an empty dictionary.

(self, newstate=None, *, force=False, **kwargs)

Source from the content-addressed store, hash-verified

363 pass
364
365 def update(self, newstate=None, *, force=False, **kwargs):
366 """Update driver.
367
368 :param newstate: a dictionary containing the new driver state.
369 :type newstate: dict.
370 :param force: apply change even when the cache says it is not necessary.
371 :param force: boolean.
372
373 :raises: ValueError if called with an empty dictionary.
374 """
375
376 newstate = _merge_dicts(newstate, kwargs)
377 if not newstate:
378 raise ValueError("update() called with an empty dictionary")
379
380 for key, value in newstate.items():
381 self._lantz_features[key].set(self, value, force)
382
383 def update_async(self, newstate=None, *, force=False, callback=None, **kwargs):
384 """Asynchronous update driver.

Callers 15

_dsetFunction · 0.80
add_color_schemesMethod · 0.80
handleMethod · 0.80
handleMethod · 0.80
_merge_dictsFunction · 0.80
wrappedFunction · 0.80
__new__Method · 0.80
logMethod · 0.80
_solve_dependenciesFunction · 0.80
_dsetFunction · 0.80
__init__Method · 0.80
query_configMethod · 0.80

Calls 3

_merge_dictsFunction · 0.85
itemsMethod · 0.45
setMethod · 0.45

Tested by 2

test_update_kwMethod · 0.64
test_update_dictMethod · 0.64