Skip to content

No argument expansion for custom decorators with function parameters #188

Open
@khatchad

Description

@khatchad

Related to #91.

Consider the following code:

import tensorflow as tf


def mama(fun):

    def wrapper_fun(*args, **kwargs):
        assert isinstance(args[0], tf.Tensor)
        fun(*args, **kwargs)

    return wrapper_fun


@mama
def f(x):
    assert isinstance(x, tf.Tensor)


f(tf.constant(1))

Currently, Ariadne doesn't expand *args and **kwargs, so we miss the tensor parameter x of `().

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions