1. bendikro
  2. line_profiler

Commits

Robert Kern  committed 4d00302

BUG: Fix the API usage.

  • Participants
  • Parent commits bc8e1e6
  • Branches default

Comments (0)

Files changed (1)

File kernprof.py

View file
         """
         # FIXME: refactor this into a utility function so that both it and
         # line_profiler can use it.
-        self.add_function(func)
         if is_generator(func):
-            f = self.wrap_generator()
+            f = self.wrap_generator(func)
         else:
-            f = self.wrap_function()
+            f = self.wrap_function(func)
         f.__module__ = func.__module__
         f.__name__ = func.__name__
         f.__doc__ = func.__doc__