10000 Fix review comments · prometheus/client_python@32535ef · GitHub
[go: up one dir, main page]

Skip to content

Commit 32535ef

Browse files
committed
Fix review comments
1 parent 0551300 commit 32535ef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

prometheus_client/metrics.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import time
33
import types
44
from typing import (
5-
Any, Callable, Dict, Iterable, Optional, Sequence, Type, TypeVar,
5+
Any, Callable, Dict, Iterable, Optional, Sequence, Type, TypeVar, Union,
66
)
77

88
from . import values # retain this import style for testability
@@ -538,7 +538,7 @@ def __init__(self,
538538
unit: str = '',
539539
registry: Optional[CollectorRegistry] = REGISTRY,
540540
_labelvalues: Optional[Sequence[str]] = None,
541-
buckets: Sequence[float] = DEFAULT_BUCKETS,
541+
buckets: Sequence[Union[float, int, str]] = DEFAULT_BUCKETS,
542542
):
543543
self._prepare_buckets(buckets)
544544
super().__init__(
@@ -553,7 +553,7 @@ def __init__(self,
553553
)
554554
self._kwargs['buckets'] = buckets
555555

556-
def _prepare_buckets(self, buckets: Sequence[float]) -> None:
556+
def _prepare_buckets(self, buckets: Sequence[Union[float, int, str]]) -> None:
557557
buckets = [float(b) for b in buckets]
558558
if buckets != sorted(buckets):
559559
# This is probably an error on the part of the user,

0 commit comments

Comments
 (0)
0