8000 Add type checks · matplotlib/matplotlib@52e5723 · GitHub
[go: up one dir, main page]

Skip to content

Commit 52e5723

Browse files
committed
Add type checks
1 parent 0f17f26 commit 52e5723

File tree

5 files changed

+6
-2
lines changed

5 files changed

+6
-2
lines changed

lib/matplotlib/backend_bases.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ class GraphicsContextBase:
167167
def get_hatch_color(self) -> ColorType: ...
168168
def set_hatch_color(self, hatch_color: ColorType) -> None: ...
169169
def get_hatch_linewidth(self) -> float: ...
170+
def set_hatch_linewidth(self, hatch_linewidth: float) -> None: ...
170171
def get_sketch_params(self) -> tuple[float, float, float] | None: ...
171172
def set_sketch_params(
172173
self,

lib/matplotlib/collections.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,8 +364,6 @@ def draw(self, renderer):
364364
if self._hatch:
365365
gc.set_hatch(self._hatch)
366366
gc.set_hatch_color(self._hatch_color)
367-
print(self._hatch_linewidth)
368-
print(self.get_hatch_linewidth())
369367
mhatch._set_hatch_linewidth(gc, self.get_hatch_linewidth())
370368

371369
if self.get_sketch_params() is not None:

lib/matplotlib/collections.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ class Collection(artist.Artist, cm.ScalarMappable):
4848
def get_urls(self) -> Sequence[str | None]: ...
4949
def set_hatch(self, hatch: str) -> None: ...
5050
def get_hatch(self) -> str: ...
51+
def set_hatch_linewidth(self, hatch_linewidth: float) -> None: ...
52+
def get_hatch_linewidth(self) -> float: ...
5153
def set_offsets(self, offsets: ArrayLike) -> None: ...
5254
def get_offsets(self) -> ArrayLike: ...
5355
def set_linewidth(self, lw: float | Sequence[float]) -> None: ...

lib/matplotlib/hatch.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,4 @@ class Stars(Shapes):
6666
def __init__(self, hatch: str, density: int) -> None: ...
6767

6868
def get_path(hatchpattern: str, density: int = ...) -> Path: ...
69+
def _set_hatch_linewidth(gc, hatch_linewidth: float) -> None: ...

lib/matplotlib/patches.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ class Patch(artist.Artist):
5959
def set_joinstyle(self, s: JoinStyleType) -> None: ...
6060
def get_joinstyle(self) -> Literal["miter", "round", "bevel"]: ...
6161
def set_hatch(self, hatch: str) -> None: ...
62+
def set_hatch_linewidth(self, hatch_linewidth: float) -> None: ...
63+
def get_hatch_linewidth(self) -> float: ...
6264
def get_hatch(self) -> str: ...
6365
def get_path(self) -> Path: ...
6466

0 commit comments

Comments
 (0)
0