Limnoria
Limnoria copied to clipboard
Allow reloading config options that use registry.OnlySomeStrings
trafficstars
Context: my NuWeather plugin uses an OnlySomeStrings option to define a list of supported weather backends and set the default one. When reloading the plugin, the list of allowed values is not automatically updated - this makes in place updates of the plugin difficult.
Workaround: override validStrings to be a property that reads a global value that gets reloaded.
Hmm and you'd need to update __doc__ and errormsg too. Might as well subclass String directly and copy-paste code from OnlySomeStrings.