Below code would produce a visual yellow warning in PyCharm, because of the missing arguments of f() inside g().
def f(b):
return b
def g():
return f()
# ^
# |___ A warning here
Which is great, since i want to see it and fix it easily whenever i modify the parameters of f().
However if i use a decorator on f(), this warning disappears:
def some_decorator(func):
def wrapped(*args, **kwargs):
func(*args, **kwargs)
return wrapped
@some_decorator
def f(b):
return b
def g():
return f()
# ^
# |___ no warning
I m guessing this happens since a decorator could be providing those needed arguments to f().
Is there a way to make PyCharm ignore decorators in above scenario and keep on displaying the warning?