Code formating.
This commit is contained in:
@ -5,6 +5,7 @@ __all__ = [
|
||||
'Option',
|
||||
]
|
||||
|
||||
|
||||
class ConfigurableMeta(type):
|
||||
"""
|
||||
Metaclass for Configurables that will add options to a special __options__ dict.
|
||||
|
||||
@ -26,5 +26,3 @@ class Option:
|
||||
|
||||
def __set__(self, inst, value):
|
||||
inst.__options_values__[self.name] = self.type(value) if self.type else value
|
||||
|
||||
|
||||
|
||||
@ -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')
|
||||
|
||||
|
||||
@ -51,6 +51,3 @@ def test_valueholder():
|
||||
assert y == x
|
||||
assert y is not x
|
||||
assert repr(x) == repr(y) == repr(43)
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user