pylint-bot / pylint-unofficial

UNOFFICIAL playground for pylint github migration
0 stars 0 forks source link

no-value-for-parameter false positive for wrapt.decorator #629

Open pylint-bot opened 9 years ago

pylint-bot commented 9 years ago

Originally reported by: Claudiu Popa (BitBucket: PCManticore, GitHub: @PCManticore)


It seems we don't understand properly wrapt.decorator, which is used to implement general decorators with additional features. The decorator function will be written with four parameters, but none of them needs to be passed explicitly when the decorated function is called, as it is the case for the following example. This issue is related and similar with the one regarding mock.patch.

#!python

import wrapt

@wrapt.decorator
def test(func, instance, args, kwargs):
    return func(*args, **kwargs)

decorated = test(some_func) # no value for parameter here