Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset a config setting to default value #36

Open
Splines opened this issue Apr 1, 2024 · 3 comments · May be fixed by #54
Open

Reset a config setting to default value #36

Splines opened this issue Apr 1, 2024 · 3 comments · May be fixed by #54
Assignees
Labels
idea An idea for a new feature

Comments

@Splines
Copy link
Collaborator

Splines commented Apr 1, 2024

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.

@Splines Splines added the idea An idea for a new feature label Apr 1, 2024
@Splines
Copy link
Collaborator Author

Splines commented Apr 11, 2024

only allow positive values for decimal_places

@Splines
Copy link
Collaborator Author

Splines commented Apr 11, 2024

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

@paul019 paul019 self-assigned this Aug 7, 2024
@paul019 paul019 linked a pull request Aug 7, 2024 that will close this issue
@Splines
Copy link
Collaborator Author

Splines commented Sep 13, 2024

New API proposals can be found in this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea An idea for a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants