enthought / enthought/apptools
PreferencesHelper does not exclude events from being set on Preferences
- Dominant language
- Python
- Stars
- 38
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
Currently if a PreferencesHelper has an event trait and if the event has been fired, the value is also saved in the preferences.
I am not sure this is a desirable behaviour.
e.g.
```
from apptools.preferences.api import Preferences, PreferencesHelper
from traits.api import Event, Str
class MyPreferencesHelper(PreferencesHelper):
preferences_path = Str('my_section')
an_event = Event()
pref = Preferences(filename="tmp.ini")
helper = MyPreferencesHelper(preferences=pref)
helper.an_event = 1
pref.save()
```
Will create output like this:
```
[my_section]
an_event = 1
```
Expected no output.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.