diff --git a/stubs/boltons/boltons/statsutils.pyi b/stubs/boltons/boltons/statsutils.pyi index a6a8d57226cc..f475b5643c49 100644 --- a/stubs/boltons/boltons/statsutils.pyi +++ b/stubs/boltons/boltons/statsutils.pyi @@ -1,8 +1,10 @@ from _typeshed import ConvertibleToFloat, FloatInt, Incomplete -from collections.abc import Callable, Iterable, Iterator -from typing import Any, Literal, overload +from collections.abc import Callable, Iterable, Iterator, Sequence +from typing import Any, Literal, TypeVar, overload from typing_extensions import Self +_Bin = TypeVar("_Bin") + class _StatsProperty: name: str func: Callable[..., Any] @@ -74,5 +76,5 @@ kurtosis: Incomplete pearson_type: Incomplete def format_histogram_counts( - bin_counts: list[FloatInt], width: int | None = None, format_bin: Callable[..., Any] | None = None + bin_counts: Sequence[tuple[_Bin, int]], width: int | None = None, format_bin: Callable[[_Bin], object] | None = None ) -> str: ...