Skip to content

Commit cd73571

Browse files
committed
sure mypy
1 parent 23a9e78 commit cd73571

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

sentry_sdk/tracing_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1538,12 +1538,12 @@ def _make_sampling_decision(
15381538
name: str,
15391539
attributes: "Optional[Attributes]",
15401540
scope: "sentry_sdk.Scope",
1541-
) -> "tuple[bool, Optional[float], Optional[float], Optional[str]]":
1541+
) -> "tuple[Optional[bool], Optional[float], Optional[float], Optional[str]]":
15421542
"""
15431543
Decide whether a span should be sampled.
15441544
15451545
Returns a tuple with:
1546-
1. the sampling decision
1546+
1. the sampling decision (sampled, unsampled, deferred)
15471547
2. the effective sample rate
15481548
3. the sample rand
15491549
4. the reason for not sampling the span, if unsampled
@@ -1593,7 +1593,7 @@ def _make_sampling_decision(
15931593
logger.warning(f"[Tracing] Discarding {name} because of invalid sample rate.")
15941594
return False, None, None, "sample_rate"
15951595

1596-
sample_rate = float(sample_rate)
1596+
sample_rate = float(sample_rate) # type: ignore[arg-type]
15971597
if not sample_rate:
15981598
if traces_sampler_defined:
15991599
reason = "traces_sampler returned 0 or False"

0 commit comments

Comments
 (0)