Open lagru opened 1 year ago
As @jni suggest's a solution might be to react to the presence of a __wrapped__
attribute on the function itself. A warning that suggests a solution might go a long way in alleviating this edge case already.
I like the idea. A good place to start would be to simply introduce the warning.
In https://github.com/scikit-image/scikit-image/issues/6499 we noticed that using
LineProfiler().add_function(decorated_func)
on a decorated function will trace the decorator and not the decorated function. While this may not necessarily be a bug on line_profiler's side we are still interested in discussing how to best approach this.