From 52b06834e228799e80cd80a758ac981b18afa703 Mon Sep 17 00:00:00 2001 From: Romain Dorgueil Date: Mon, 22 May 2017 10:35:54 +0200 Subject: [PATCH] Formating. --- bonobo/config/configurables.py | 2 +- bonobo/config/options.py | 1 - tests/test_config_method.py | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bonobo/config/configurables.py b/bonobo/config/configurables.py index 77801fa..aef371b 100644 --- a/bonobo/config/configurables.py +++ b/bonobo/config/configurables.py @@ -56,7 +56,7 @@ class Configurable(metaclass=ConfigurableMeta): def __new__(cls, *args, **kwargs): if cls.__wrappable__ and len(args) == 1 and hasattr(args[0], '__call__'): - return type(args[0].__name__, (cls,), {cls.__wrappable__: args[0]}) + return type(args[0].__name__, (cls, ), {cls.__wrappable__: args[0]}) return super(Configurable, cls).__new__(cls) diff --git a/bonobo/config/options.py b/bonobo/config/options.py index 545d1ca..51f4a20 100644 --- a/bonobo/config/options.py +++ b/bonobo/config/options.py @@ -74,7 +74,6 @@ class Option: return self.default() if callable(self.default) else self.default - class Method(Option): """ A Method is a special callable-valued option, that can be used in three different ways (but for same purpose). diff --git a/tests/test_config_method.py b/tests/test_config_method.py index dbca538..13eb873 100644 --- a/tests/test_config_method.py +++ b/tests/test_config_method.py @@ -15,6 +15,7 @@ class MethodBasedConfigurable(Configurable): def test_one_wrapper_only(): with pytest.raises(ConfigurationError): + class TwoMethods(Configurable): h1 = Method() h2 = Method()