Ejemplo n.º 1
0
 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)
Ejemplo n.º 2
0
    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)
Ejemplo n.º 3
0
    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)