Closed
Description
Originally reported by: the mulhern (BitBucket: the_mulhern)
Here's the example:
#!python
def decorator(f):
def new_func(junk=None):
f(2, junk=junk)
return new_func
@decorator
def junk1(param, junk=None):
print("%s" % junk)
def main():
junk1(junk=2)
The analysis reports
"No value passed for parameter 'param' in function call (no-value-for-parameter)"
This is incorrect, since the actual function being called is the new_func manufactured
by the decorator, and that function does not require the parameter 'param'.
You can work around this by giving param a default value, (which will never be used).