Skip to content

Commit 070b940

Browse files
committed
🚧 [APPROVAL NEEDED] Explicitly specify class constructor parameters
Resolves `TypeError`s thrown by Mypyc-compiled code as a result of empty tuple assignment to an int-typed `level` parameter during superclass initialization.
1 parent e019a56 commit 070b940

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

structlog_sentry/__init__.py

+10-2
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,16 @@ class SentryJsonProcessor(SentryProcessor):
133133
Uses Sentry SDK to capture events in Sentry.
134134
"""
135135

136-
def __init__(self, *args: Any, **kwargs: Any) -> None:
137-
super().__init__(*args, **kwargs)
136+
def __init__(
137+
self,
138+
level: int = logging.WARNING,
139+
active: bool = True,
140+
as_extra: bool = True,
141+
tag_keys: Union[List[str], str] = None,
142+
) -> None:
143+
super().__init__(
144+
level=level, active=active, as_extra=as_extra, tag_keys=tag_keys
145+
)
138146
# A set of all encountered structured logger names. If an application uses
139147
# multiple loggers with different names (eg. different qualnames), then each of
140148
# those loggers needs to be ignored in Sentry's logging integration so that this

0 commit comments

Comments
 (0)