From 57704bddc753f391cbcb0db224d1bb053c6b1239 Mon Sep 17 00:00:00 2001 From: rrraaaccc <78492961+rrraaaccc@users.noreply.github.com> Date: Sun, 7 Jan 2024 13:14:10 +0100 Subject: [PATCH] use functools.wrap for the TimeFuncton wrapper. --- python/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/__init__.py b/python/__init__.py index ce5e3529..c262ddd6 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -49,9 +49,11 @@ def Redraw(*args, **kwargs): return _Redraw(*args, **kwargs) from pyngcore import Timer +from functools import wraps def TimeFunction(func, name=None): name = name or func.__qualname__ timer = Timer(name) + @wraps(func) def retfunc(*args,**kwargs): with timer: ret = func(*args, **kwargs)