def wrap(method): assert isinstance(provides, (list, tuple, type(None))) assert isinstance(requires, (list, tuple, type(None))) assert isinstance(optional_requires, (list, tuple, type(None))) method.poni_control = dict(provides=provides, requires=requires, optional_requires=optional_requires) return expects_obj(method)
def wrap(method): assert isinstance(provides, (list, tuple, type(None))) assert isinstance(requires, (list, tuple, type(None))) assert isinstance(optional_requires, (list, tuple, type(None))) if auto_enable: method.poni_control = dict(provides=provides, requires=requires, optional_requires=optional_requires) else: assert not any([provides, requires, optional_requires]) return expects_obj(method)