Use functools.wraps
This commit is contained in:
parent
758f017f22
commit
8be6b21bed
1 changed files with 2 additions and 0 deletions
|
@ -3,6 +3,7 @@ from __future__ import annotations
|
||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
from contextvars import ContextVar
|
from contextvars import ContextVar
|
||||||
|
from functools import wraps
|
||||||
from typing import Any, Callable, ClassVar, Generic, Self, TypeVar
|
from typing import Any, Callable, ClassVar, Generic, Self, TypeVar
|
||||||
from weakref import WeakSet
|
from weakref import WeakSet
|
||||||
|
|
||||||
|
@ -90,6 +91,7 @@ class Watcher:
|
||||||
if not hasattr(self, "_watches"):
|
if not hasattr(self, "_watches"):
|
||||||
self._watches = set()
|
self._watches = set()
|
||||||
|
|
||||||
|
@wraps(handler)
|
||||||
def run_handler():
|
def run_handler():
|
||||||
handler()
|
handler()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue