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 1aca764

Browse filesBrowse files
committed
Add type hints for IPython _repr_* helpers
These are semi-public.
1 parent e5e601b commit 1aca764
Copy full SHA for 1aca764

File tree

Expand file treeCollapse file tree

4 files changed

+6
-0
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+6
-0
lines changed

‎lib/matplotlib/animation.pyi

Copy file name to clipboardExpand all lines: lib/matplotlib/animation.pyi
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ class Animation:
183183
embed_frames: bool = ...,
184184
default_mode: str | None = ...,
185185
) -> str: ...
186+
def _repr_html_(self) -> str: ...
186187
def pause(self) -> None: ...
187188
def resume(self) -> None: ...
188189

‎lib/matplotlib/colors.pyi

Copy file name to clipboardExpand all lines: lib/matplotlib/colors.pyi
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ class Colormap:
9797
def is_gray(self) -> bool: ...
9898
def resampled(self, lutsize: int) -> Colormap: ...
9999
def reversed(self, name: str | None = ...) -> Colormap: ...
100+
def _repr_html_(self) -> str: ...
101+
def _repr_png_(self) -> bytes: ...
100102
def copy(self) -> Colormap: ...
101103

102104
class LinearSegmentedColormap(Colormap):

‎lib/matplotlib/figure.pyi

Copy file name to clipboardExpand all lines: lib/matplotlib/figure.pyi
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@ class Figure(FigureBase):
315315
**kwargs
316316
) -> None: ...
317317
def get_layout_engine(self) -> LayoutEngine | None: ...
318+
def _repr_html_(self) -> str | None: ...
318319
def show(self, warn: bool = ...) -> None: ...
319320
@property # type: ignore[misc]
320321
def axes(self) -> list[Axes]: ... # type: ignore[override]

‎lib/matplotlib/font_manager.pyi

Copy file name to clipboardExpand all lines: lib/matplotlib/font_manager.pyi
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ class FontEntry:
3535
weight: str | int = ...
3636
stretch: str = ...
3737
size: str = ...
38+
def _repr_html_(self) -> str: ...
39+
def _repr_png_(self) -> bytes: ...
3840

3941
def ttfFontProperty(font: ft2font.FT2Font) -> FontEntry: ...
4042
def afmFontProperty(fontpath: str, font: AFM) -> FontEntry: ...

0 commit comments

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