Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ec0653d

Browse filesBrowse files
authored
Merge pull request #28068 from FelipeCybis/linearsegmentedcolormap-typehint
[TYP] Add possible type hint to `colors` argument in `LinearSegmentedColormap.from_list`
2 parents 91234e2 + 32f2c3b commit ec0653d
Copy full SHA for ec0653d

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎lib/matplotlib/colors.pyi

Copy file name to clipboardExpand all lines: lib/matplotlib/colors.pyi
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class LinearSegmentedColormap(Colormap):
124124
def set_gamma(self, gamma: float) -> None: ...
125125
@staticmethod
126126
def from_list(
127-
name: str, colors: ArrayLike, N: int = ..., gamma: float = ...
127+
name: str, colors: ArrayLike | Sequence[tuple[float, ColorType]], N: int = ..., gamma: float = ...
128128
) -> LinearSegmentedColormap: ...
129129
def resampled(self, lutsize: int) -> LinearSegmentedColormap: ...
130130
def reversed(self, name: str | None = ...) -> LinearSegmentedColormap: ...

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.