Skip to content

Commit

Permalink
ref: match signature of Signal.connect (#74959)
Browse files Browse the repository at this point in the history
technically our implementation is incompatible with the base class
(since it adds decorator functionality) -- this works around that for
now but this will need to be revisited when fully typed

<!-- Describe your PR here. -->
  • Loading branch information
asottile-sentry committed Jul 25, 2024
1 parent 0abc867 commit f73b851
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sentry/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def __exit__(self, *args) -> bool | None:


class BetterSignal(Signal):
def connect(self, receiver=None, **kwargs):
def connect(self, receiver=None, *args, **kwargs):
"""
Support decorator syntax:
Expand All @@ -66,7 +66,7 @@ def connect(self, receiver=None, **kwargs):
"""

def wrapped(func):
return super(BetterSignal, self).connect(func, **kwargs)
return super(BetterSignal, self).connect(func, *args, **kwargs)

if receiver is None:
return wrapped
Expand Down

0 comments on commit f73b851

Please sign in to comment.