How to use the wirerope.WireRope function in wirerope

To help you get started, we’ve selected a few wirerope examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github youknowone / ring / ring / func / base.py View on Github external
#     wire_slots = ()

        # func = self.__func__ if type(self.__func__) is types.FunctionType else Callable(self.__func__).wrapped_callable  # noqa
        # interface_keys = tuple(k for k in dir(user_interface) if k[0] != '_')

        class _RingWire(RingWire):
            # if wire_slots is not False:
            #     assert isinstance(wire_slots, tuple)
            #     __slots__ = interface_keys + wire_slots

            if allows_default_action:
                # @functools.wraps(func)
                def __call__(self, *args, **kwargs):
                    return self.run(self._rope.config.default_action, *args, **kwargs)

        self.wire_rope = WireRope(_RingWire, RingRope)
        self.wire_rope._ring_object = self
github youknowone / methodtools / methodtools.py View on Github external
def lru_cache(*args, **kwargs):
    return WireRope(_LruCacheWire, wraps=True, rope_args=(args, kwargs))

wirerope

'Turn functions and methods into fully controllable objects'

BSD-2-Clause
Latest version published 2 years ago

Package Health Score

50 / 100
Full package analysis