Use functools.wraps

This commit is contained in:
Jan Hamal Dvořák 2025-03-11 17:56:28 +01:00
parent 758f017f22
commit 8be6b21bed

View file

@ -3,6 +3,7 @@ from __future__ import annotations
import sys
import traceback
from contextvars import ContextVar
from functools import wraps
from typing import Any, Callable, ClassVar, Generic, Self, TypeVar
from weakref import WeakSet
@ -90,6 +91,7 @@ class Watcher:
if not hasattr(self, "_watches"):
self._watches = set()
@wraps(handler)
def run_handler():
handler()