Skip to content

Commit

Permalink
Update traces_sampler declaration to concrete types (#1091)
Browse files Browse the repository at this point in the history
Fixes #1090
  • Loading branch information
Ogaday authored Apr 16, 2021
1 parent a95bf9f commit 927903e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sentry_sdk/_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


if MYPY:
from numbers import Real
from types import TracebackType
from typing import Any
from typing import Callable
Expand All @@ -32,7 +31,7 @@
ErrorProcessor = Callable[[Event, ExcInfo], Optional[Event]]
BreadcrumbProcessor = Callable[[Breadcrumb, BreadcrumbHint], Optional[Breadcrumb]]

TracesSampler = Callable[[SamplingContext], Union[Real, bool]]
TracesSampler = Callable[[SamplingContext], Union[float, int, bool]]

# https://github.com/python/mypy/issues/5710
NotImplementedType = Any
Expand Down

0 comments on commit 927903e

Please sign in to comment.