Skip to content

Commit 26c18bf

Browse files
committed
FIX: use wraps in profile
1 parent bd6da91 commit 26c18bf

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

memory_profiler.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,13 +1130,15 @@ def profile(func=None, stream=None, precision=1, backend='psutil'):
11301130
show_results, stream=stream, precision=precision
11311131
)
11321132
if iscoroutinefunction(func):
1133+
@wraps(wrapped=func)
11331134
@coroutine
11341135
def wrapper(*args, **kwargs):
11351136
prof = get_prof()
11361137
val = yield from prof(func)(*args, **kwargs)
11371138
show_results_bound(prof)
11381139
return val
11391140
else:
1141+
@wraps(wrapped=func)
11401142
def wrapper(*args, **kwargs):
11411143
prof = get_prof()
11421144
val = prof(func)(*args, **kwargs)

0 commit comments

Comments
 (0)