resultwizard/ResultWizard

Reset a config setting to default value

Opened this issue · 3 comments

Imagine the scenario when a user sets a config setting, e.g.

wiz.config(decimal_places=2)

Later on, the users wants to reset this config to the default value. Right now, they would have to lookup the default value which is -1 for decimal_places. Setting wiz.config(decimal_places=None) will result in unintended behavior.

To avoid this, we should provide something like:

wiz.reset("decimal_places")

String values could be stored in an enum so that we get IntelliSense. These values should be kept in sync with config_init and config.

only allow positive values for decimal_places

idea: wiz.config.decimal_places.set(2)
and wiz.config.decimal_places.reset()

New API proposals can be found in this comment.