PyCharm console and decorators
Answered
I have a module that looks like this:
import functools
def decorator(f):
@functools.wraps(f)
def wrapper(*args, **kwargs):
print('hello world')
result = f(*args, **kwargs)
return result
return wrapper
@decorator
def add(a, b):
print(a + b)
In the editor, if I then type `add(` and hit CTRL+P, I see "a,b" as the parameter hints, as I would expect.
However, in the PyCharm console, I see "(*args, **kwargs)" as the parameter hints, which is not helpful or desired. Is this a bug in the PyCharm console?
Please sign in to leave a comment.
Hi, thank you for the report. Yeap, looks like an issue in the console, I've created a ticket in our bug tracker: PY-30955.