diff --git a/bonobo/config/configurables.py b/bonobo/config/configurables.py index bf6df76..6be2b29 100644 --- a/bonobo/config/configurables.py +++ b/bonobo/config/configurables.py @@ -5,6 +5,7 @@ __all__ = [ 'Option', ] + class ConfigurableMeta(type): """ Metaclass for Configurables that will add options to a special __options__ dict. diff --git a/bonobo/config/options.py b/bonobo/config/options.py index c0a3fd0..2ea67f9 100644 --- a/bonobo/config/options.py +++ b/bonobo/config/options.py @@ -26,5 +26,3 @@ class Option: def __set__(self, inst, value): inst.__options_values__[self.name] = self.type(value) if self.type else value - - diff --git a/bonobo/io/csv.py b/bonobo/io/csv.py index 58b863c..4922b43 100644 --- a/bonobo/io/csv.py +++ b/bonobo/io/csv.py @@ -55,7 +55,7 @@ class CsvReader(CsvHandler, FileReader): for row in reader: if len(row) != field_count: - raise ValueError('Got a line with %d fields, expecting %d.' % (len(row), field_count,)) + raise ValueError('Got a line with %d fields, expecting %d.' % (len(row), field_count, )) yield dict(zip(headers.value, row)) diff --git a/bonobo/util/objects.py b/bonobo/util/objects.py index 3b228dd..bb06cc4 100644 --- a/bonobo/util/objects.py +++ b/bonobo/util/objects.py @@ -129,10 +129,10 @@ class ValueHolder: return divmod(other, self.value) def __pow__(self, other): - return self.value ** other + return self.value**other def __rpow__(self, other): - return other ** self.value + return other**self.value def __ipow__(self, other): self.value **= other diff --git a/tests/test_config.py b/tests/test_config.py index e6d3916..3f17a53 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -18,6 +18,7 @@ class MyHarderConfigurable(MyConfigurable): class MyBetterConfigurable(MyConfigurable): required_str = Option(str, required=False, default='kaboom') + class MyConfigurableUsingPositionalOptions(MyConfigurable): first = Option(str, required=True, positional=True) second = Option(str, required=True, positional=True) @@ -142,4 +143,3 @@ def test_service_dependency_unavailable(): def test_option_positional(): o = MyConfigurableUsingPositionalOptions('1', '2', '3', required_str='hello') - diff --git a/tests/util/test_objects.py b/tests/util/test_objects.py index 93928d4..8f15f71 100644 --- a/tests/util/test_objects.py +++ b/tests/util/test_objects.py @@ -51,6 +51,3 @@ def test_valueholder(): assert y == x assert y is not x assert repr(x) == repr(y) == repr(43) - - -