Skip to content

Commit 927903e

Browse files
authored
Update traces_sampler declaration to concrete types (#1091)
Fixes #1090
1 parent a95bf9f commit 927903e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

sentry_sdk/_types.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66

77
if MYPY:
8-
from numbers import Real
98
from types import TracebackType
109
from typing import Any
1110
from typing import Callable
@@ -32,7 +31,7 @@
3231
ErrorProcessor = Callable[[Event, ExcInfo], Optional[Event]]
3332
BreadcrumbProcessor = Callable[[Breadcrumb, BreadcrumbHint], Optional[Breadcrumb]]
3433

35-
TracesSampler = Callable[[SamplingContext], Union[Real, bool]]
34+
TracesSampler = Callable[[SamplingContext], Union[float, int, bool]]
3635

3736
# https://github.com/python/mypy/issues/5710
3837
NotImplementedType = Any

0 commit comments

Comments
 (0)