Updatable

class Updatable[source]

Bases: ABC

Adds parameter updating functionality to a module.

clear(**kwargs) None[source]

Clears the updater’s state.

abstract defaultupdater(*includes: str, **kwargs) Updater[source]

Default updater for this object.

Parameters:

*includes (str) – additional instance-specific parameters to include.

Raises:

RuntimeErrordefaultupdater must be implemented by the subclass.

Returns:

the default updater.

Return type:

Updater

property updatable: bool

If the module is updatable.

Returns:

if the module is updatable.

Return type:

bool

update(clear: bool = True, **kwargs) None[source]

Applies all accumulated updates.

Parameters:

clear (bool, optional) – if accumulators should be cleared after updating. Defaults to True.

property updater: Updater | None

Updater for the module.

Deleting this attribute deletes the associated updater.

Parameters:

Updater – new updater to set.

Returns:

current updater if it exists, otherwise None.

Return type:

Updater | None

updatesome(*params, clear: bool = True, **kwargs) None[source]

Applies accumulated updates to specific parameters.

Parameters:
  • *params (str) – parameters to update.

  • clear (bool, optional) – if accumulators should be cleared after updating. Defaults to True.