Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit5a90227

Browse files
committed
[TYP] Change typing for texts to Any/object
1 parentdceb278 commit5a90227

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

‎lib/matplotlib/axes/_axes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -641,8 +641,8 @@ def text(self, x, y, s, fontdict=None, **kwargs):
641641
coordinates. The coordinate system can be changed using the
642642
*transform* parameter.
643643
644-
s :str
645-
The text.
644+
s :object
645+
The text. Will be converted to `str`, see `.Text.set_text`.
646646
647647
fontdict : dict, default: None
648648

‎lib/matplotlib/axes/_axes.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class Axes(_AxesBase):
112112
self,
113113
x:float,
114114
y:float,
115-
s:str,
115+
s:Any,
116116
fontdict:dict[str,Any]|None= ...,
117117
**kwargs
118118
)->Text: ...

‎lib/matplotlib/table.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ def __init__(self, xy, width, height, *,
7676
The cell facecolor.
7777
fill : bool
7878
Whether the cell background is filled.
79-
text :str
80-
The cell text.
79+
text :object
80+
The cell text. Will be converted to `str`, see `.Text.set_text`.
8181
loc : {'left', 'center', 'right'}, default: 'right'
8282
The alignment of the text within the cell.
8383
fontproperties : dict

‎lib/matplotlib/table.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class Cell(Rectangle):
2121
edgecolor:ColorType= ...,
2222
facecolor:ColorType= ...,
2323
fill:bool= ...,
24-
text:str= ...,
24+
text:Any= ...,
2525
loc:Literal["left","center","right"]|None= ...,
2626
fontproperties:dict[str,Any]|None= ...,
2727
visible_edges:str|None= ...
@@ -68,7 +68,7 @@ class Table(Artist):
6868

6969
deftable(
7070
ax:Axes,
71-
cellText:Sequence[Sequence[str]]|None= ...,
71+
cellText:Sequence[Sequence[Any]]|None= ...,
7272
cellColours:Sequence[Sequence[ColorType]]|None= ...,
7373
cellLoc:Literal["left","center","right"]= ...,
7474
colWidths:Sequence[float]|None= ...,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp