How to use the wrapt.ObjectProxy.__init__ function in wrapt

To help you get started, we’ve selected a few wrapt 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 PyCQA / astroid / astroid / tree / zipper.py View on Github external
    def __init__(self, focus, path=None, _init=wrapt.ObjectProxy.__init__):
        '''Make a new zipper.

        Arguments:
            focus (base.NodeNG, collections.Sequence): The focus for this
                zipper, will be assigned to self.__wrapped__ by
                wrapt.ObjectProxy's __init__.
            path: The path of the zipper used to create the new zipper, if any.

        Returns:
            A new zipper object.
        '''
        _init(self, focus)
        self._self_path = path
github airbnb / omniduct / omniduct / utils / proxies.py View on Github external
def __init__(self, tree, is_flat=False, get_nesting=None):
        ObjectProxy.__init__(self, tree.get(None))
        self._self_tree = tree
        self._self_tree_is_flat = is_flat
        self._self_tree_get_nesting = get_nesting