[config] Refactoring of configurables, allowing partially configured objects.
Configurables did not allow more than one "method" option, and mixed scenarios (options+methods+...) were sometimes flaky, forcing the user to know what order was the right one. Now, all options work the same, sharing the same "order" namespace. Backward incompatible change: Options are now required by default, unless a default is provided. Also adds a few candies for debugging/testing, found in the bonobo.util.inspect module.
This commit is contained in:
@ -27,7 +27,7 @@ class Setting:
|
||||
self.validator = None
|
||||
|
||||
def __repr__(self):
|
||||
return '<Setting {}={!r}>'.format(self.name, self.value)
|
||||
return '<Setting {}={!r}>'.format(self.name, self.get())
|
||||
|
||||
def set(self, value):
|
||||
if self.validator and not self.validator(value):
|
||||
|
||||
Reference in New Issue
Block a user