8000 Update for recent internal API changes · matplotlib/matplotlib@e4cedb1 · GitHub
[go: up one dir, main page]

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 e4cedb1

Browse files
committed
Update for recent internal API changes
1 parent e4aa8b7 commit e4cedb1

File tree

4 files changed

+9
-14
lines changed

4 files changed

+9
-14
lines changed

lib/matplotlib/cm.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class ColormapRegistry(Mapping[str, colors.Colormap]):
1919
def get_cmap(self, cmap: str | colors.Colormap): ...
2020

2121
_colormaps: ColormapRegistry = ...
22+
def get_cmap(name: str | colors.Colormap | None =..., lut: int | None =...): ...
2223

2324
class ScalarMappable:
2425
cmap: colors.Colormap | None

lib/matplotlib/offsetbox.pyi

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,7 @@ class OffsetBox(martist.Artist):
3636
) -> None: ...
3737
def get_offset(
3838
self,
39-
width: float,
40-
height: float,
41-
xdescent: float,
42-
ydescent: float,
39+
bbox: Bbox,
4340
renderer: RendererBase,
4441
) -> tuple[float, float]: ...
4542
def set_width(self, width: float) -> None: ...
@@ -178,10 +175,7 @@ class AnchoredOffsetbox(OffsetBox):
178175
) -> None: ...
179176
def get_offset(
180177
self,
181-
width: float,
182-
height: float,
183-
xdescent: float,
184-
ydescent: float,
178+
bbox: Bbox,
185179
renderer: RendererBase,
186180
) -> tuple[float, float]: ...
187181
def update_frame(self, bbox: Bbox, fontsize: float | None = ...) -> None: ...

lib/matplotlib/patheffects.pyi

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class Normal(AbstractPathEffect): ...
5353
class Stroke(AbstractPathEffect):
5454
def __init__(self, offset: tuple[float, float] = ..., **kwargs) -> None: ...
5555
# rgbFace becomes non-optional
56-
def draw_path(self, gc: GraphicsContextBase, tpath: Path, affine: Transform, rgbFace: ColorType = ...) -> None: ... # type: ignore
56+
def draw_path(self, renderer: RendererBase, gc: GraphicsContextBase, tpath: Path, affine: Transform, rgbFace: ColorType = ...) -> None: ... # type: ignore
5757

5858
class withStroke(Stroke): ...
5959

@@ -67,7 +67,7 @@ class SimplePatchShadow(AbstractPathEffect):
6767
**kwargs
6868
) -> None: ...
6969
# rgbFace becomes non-optional
70-
def draw_path(self, gc: GraphicsContextBase, tpath: Path, affine: Transform, rgbFace: ColorType = ...) -> None: ... # type: ignore
70+
def draw_path(self, renderer: RendererBase, gc: GraphicsContextBase, tpath: Path, affine: Transform, rgbFace: ColorType = ...) -> None: ... # type: ignore
7171

7272
class withSimplePatchShadow(SimplePatchShadow): ...
7373

@@ -81,13 +81,13 @@ class SimpleLineShadow(AbstractPathEffect):
8181
**kwargs
8282
) -> None: ...
8383
# rgbFace becomes non-optional
84-
def draw_path(self, gc: GraphicsContextBase, tpath: Path, affine: Transform, rgbFace: ColorType = ...) -> None: ... # type: ignore
84+
def draw_path(self, renderer: RendererBase, gc: GraphicsContextBase, tpath: Path, affine: Transform, rgbFace: ColorType = ...) -> None: ... # type: ignore
8585

8686
class PathPatchEffect(AbstractPathEffect):
8787
patch: Patch
8888
def __init__(self, offset: tuple[float, float] = ..., **kwargs) -> None: ...
8989
# rgbFace becomes non-optional
90-
def draw_path(self, gc: GraphicsContextBase, tpath: Path, affine: Transform, rgbFace: ColorType = ...) -> None: ... # type: ignore
90+
def draw_path(self, renderer: RendererBase, gc: GraphicsContextBase, tpath: Path, affine: Transform, rgbFace: ColorType = ...) -> None: ... # type: ignore
9191

9292
class TickedStroke(AbstractPathEffect):
9393
def __init__(
@@ -99,6 +99,6 @@ class TickedStroke(AbstractPathEffect):
9999
**kwargs
100100
) -> None: ...
101101
# rgbFace becomes non-optional
102-
def draw_path(self, gc: GraphicsContextBase, tpath: Path, affine: Transform, rgbFace: ColorType = ...) -> None: ... # type: ignore
102+
def draw_path(self, renderer: RendererBase, gc: GraphicsContextBase, tpath: Path, affine: Transform, rgbFace: ColorType = ...) -> None: ... # type: ignore
103103

104104
class withTickedStroke(TickedStroke): ...

lib/matplotlib/transforms.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class BboxBase(TransformNode):
9898
def count_contains(self, vertices: ArrayLike) -> int: ...
9999
def count_overlaps(self, bboxes: Iterable[BboxBase]) -> int: ...
100100
def expanded(self, sw: float, sh: float) -> Bbox: ...
101-
def padded(self, p: float) -> Bbox: ...
101+
def padded(self, w_pad: float, h_pad: float | None) -> Bbox: ...
102102
def translated(self, tx: float, ty: float) -> Bbox: ...
103103
def corners(self) -> np.ndarray: ...
104104
def rotated(self, radians: float) -> Bbox: ...

0 commit comments

Comments
 (0)
0