Skip to content

Commit 869b686

Browse files
committed
try overloads
1 parent c5bbf4e commit 869b686

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

src/sentry/seer/similarity/utils.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import logging
22
from collections.abc import Mapping, Sequence
33
from enum import StrEnum
4-
from typing import Any, TypedDict, TypeVar
4+
from typing import Any, Literal, TypedDict, TypeVar, overload
55

66
from sentry import options
77
from sentry.eventstore.models import Event, GroupEvent
@@ -354,6 +354,24 @@ def has_too_many_contributing_frames(
354354
return False
355355

356356

357+
@overload
358+
def killswitch_enabled(
359+
project_id: int,
360+
referrer: Literal[ReferrerOptions.INGEST],
361+
event: Event,
362+
) -> bool: ...
363+
364+
365+
@overload
366+
def killswitch_enabled(
367+
project_id: int,
368+
referrer: Literal[
369+
ReferrerOptions.BACKFILL, ReferrerOptions.DELETION, ReferrerOptions.SIMILAR_ISSUES_TAB
370+
],
371+
event: None = None,
372+
) -> bool: ...
373+
374+
357375
def killswitch_enabled(
358376
project_id: int | None,
359377
referrer: ReferrerOptions,

0 commit comments

Comments
 (0)