Skip to content

Commit 3780eed

Browse files
committed
fix mypy
1 parent b3b5f6a commit 3780eed

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

sentry_sdk/_log_batcher.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
from typing import TYPE_CHECKING
22

33
from sentry_sdk._batcher import Batcher
4+
from sentry_sdk._types import Log
45
from sentry_sdk.utils import serialize_attribute
56
from sentry_sdk.envelope import Envelope, Item, PayloadRef
67

78
if TYPE_CHECKING:
89
from typing import Any
9-
from sentry_sdk._types import Log
1010

1111

12-
class LogBatcher(Batcher):
12+
class LogBatcher(Batcher[Log]):
1313
MAX_BEFORE_FLUSH = 100
1414
MAX_BEFORE_DROP = 1_000
1515
FLUSH_WAIT_TIME = 5.0

sentry_sdk/_metrics_batcher.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
from typing import TYPE_CHECKING
22

33
from sentry_sdk._batcher import Batcher
4+
from sentry_sdk._types import Metric
45
from sentry_sdk.utils import serialize_attribute
56
from sentry_sdk.envelope import Item
67

78
if TYPE_CHECKING:
89
from typing import Any
9-
from sentry_sdk._types import Metric
1010

1111

12-
class MetricsBatcher(Batcher):
12+
class MetricsBatcher(Batcher[Metric]):
1313
MAX_BEFORE_FLUSH = 1000
1414
MAX_BEFORE_DROP = 10_000
1515
FLUSH_WAIT_TIME = 5.0
@@ -38,7 +38,7 @@ def _to_transport_format(metric: "Metric") -> "Any":
3838

3939
return res
4040

41-
def _record_lost(self):
41+
def _record_lost(self, item: "Metric") -> None:
4242
self._record_lost_func(
4343
reason="queue_overflow",
4444
data_category="trace_metric",

0 commit comments

Comments
 (0)