Autocomplete with arguments for decorated functions

Consider the following program:

def decorator(f):
return f

def foo(x, y):
return x + y

When I type foo, I get an autocomplete that includes the argument list x, y.

Now, suppose I decorate foo:

def decorator(f):
return f


@decorator
def foo(x, y):
return x + y

Now, I no longer get the argument list x, y.

Is there a way to write this code such that I still get to see the argument list? (Context: I'm a library author trying to make my library work well with PyCharm. So changes to PyCharm configuration settings don't help me.)

1 comment
Comment actions Permalink

Hi,

I am able to reproduce it. Thank you for providing sample code!

Here is an issue about it https://youtrack.jetbrains.com/issue/PY-33688, please follow it for updates.

0

Please sign in to leave a comment.