From db8abc20c22a375465abe301d421ec23ed6220df Mon Sep 17 00:00:00 2001 From: Kyle Sunden Date: Thu, 25 Apr 2024 14:39:48 -0500 Subject: [PATCH] Backport PR #28068: [TYP] Add possible type hint to `colors` argument in `LinearSegmentedColormap.from_list` --- lib/matplotlib/colors.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/colors.pyi b/lib/matplotlib/colors.pyi index 9bb1725f4f78..514801b714b8 100644 --- a/lib/matplotlib/colors.pyi +++ b/lib/matplotlib/colors.pyi @@ -124,7 +124,7 @@ class LinearSegmentedColormap(Colormap): def set_gamma(self, gamma: float) -> None: ... @staticmethod def from_list( - name: str, colors: ArrayLike, N: int = ..., gamma: float = ... + name: str, colors: ArrayLike | Sequence[tuple[float, ColorType]], N: int = ..., gamma: float = ... ) -> LinearSegmentedColormap: ... def resampled(self, lutsize: int) -> LinearSegmentedColormap: ... def reversed(self, name: str | None = ...) -> LinearSegmentedColormap: ...