8000 Use @wraps for Django Signal receivers (#1815) · chdsbd/sentry-python@729204f · GitHub
[go: up one dir, main page]

Skip to content

Commit 729204f

Browse files
Use @wraps for Django Signal receivers (getsentry#1815)
Co-authored-by: Neel Shah <neelshah.sa@gmail.com>
1 parent c318b90 commit 729204f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sentry_sdk/integrations/django/signals_handlers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from django.dispatch import Signal
55

66
from sentry_sdk import Hub
7+
from sentry_sdk._functools import wraps
78
from sentry_sdk._types import MYPY
89
from sentry_sdk.consts import OP
910

@@ -52,6 +53,7 @@ def _sentry_live_receivers(self, sender):
5253

5354
def sentry_receiver_wrapper(receiver):
5455
# type: (Callable[..., Any]) -> Callable[..., Any]
56+
@wraps(receiver)
5557
def wrapper(*args, **kwargs):
5658
# type: (Any, Any) -> Any
5759
signal_name = _get_receiver_name(receiver)

0 commit comments

Comments
 (0)
0