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

Commitb64dd55

Browse files
authored
Merge pull request#26945 from meeseeksmachine/auto-backport-of-pr-26927-on-v3.8.x
Backport PR#26927 on branch v3.8.x ([TYP] Remove some stubtest allowlist entries)
2 parents7764c49 +d49096b commitb64dd55

File tree

4 files changed

+21
-34
lines changed

4 files changed

+21
-34
lines changed

‎ci/mypy-stubtest-allowlist.txt

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,6 @@ matplotlib.ticker.LogitLocator.nonsingular
3232
matplotlib.backend_bases._Mode.__new__
3333
matplotlib.units.Number.__hash__
3434

35-
# Property read-write vs read-only weirdness, fix if possible
36-
matplotlib.offsetbox.DraggableBase.canvas
37-
matplotlib.offsetbox.DraggableBase.cids
38-
matplotlib.transforms.BboxTransform.is_separable
39-
matplotlib.transforms.BboxTransformFrom.is_separable
40-
matplotlib.transforms.BboxTransformTo.is_separable
41-
matplotlib.transforms.BlendedAffine2D.is_separable
42-
matplotlib.transforms.CompositeGenericTransform.is_separable
43-
matplotlib.transforms.TransformWrapper.input_dims
44-
matplotlib.transforms.TransformWrapper.is_separable
45-
matplotlib.transforms.TransformWrapper.output_dims
46-
4735
# 3.6 Pending deprecations
4836
matplotlib.figure.Figure.set_constrained_layout
4937
matplotlib.figure.Figure.set_constrained_layout_pads
@@ -150,16 +138,10 @@ matplotlib.text.Text.set_weight
150138
matplotlib.axes._base._AxesBase.get_fc
151139
matplotlib.axes._base._AxesBase.set_fc
152140

153-
# Other dynamic python behaviors not type hinted
154-
matplotlib.rcsetup.defaultParams
155-
156141
# Maybe should be abstractmethods, required for subclasses, stubs define once
157142
matplotlib.tri.*TriInterpolator.__call__
158143
matplotlib.tri.*TriInterpolator.gradient
159144

160-
# Functionally a method call, but actually a class instance, type hinted as former
161-
matplotlib.rcsetup.validate_fillstyle
162-
163145
# TypeVar used only in type hints
164146
matplotlib.backend_bases.FigureCanvasBase._T
165147
matplotlib.backend_managers.ToolManager._T

‎lib/matplotlib/offsetbox.pyi

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,11 +287,15 @@ class AnnotationBbox(martist.Artist, mtext._AnnotationBase):
287287
classDraggableBase:
288288
ref_artist:martist.Artist
289289
got_artist:bool
290-
canvas:FigureCanvasBase
291-
cids:list[int]
292290
mouse_x:int
293291
mouse_y:int
294292
background:Any
293+
294+
@property
295+
defcanvas(self)->FigureCanvasBase: ...
296+
@property
297+
defcids(self)->list[int]: ...
298+
295299
def__init__(self,ref_artist:martist.Artist,use_blit:bool= ...)->None: ...
296300
defon_motion(self,evt:Event)->None: ...
297301
defon_pick(self,evt:Event)->None: ...

‎lib/matplotlib/rcsetup.pyi

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@ def validate_fontstretch(
129129
defvalidate_font_properties(s:Any)->dict[str,Any]: ...
130130
defvalidate_whiskers(s:Any)->list[float]|float: ...
131131
defvalidate_ps_distiller(s:Any)->None|Literal["ghostscript","xpdf"]: ...
132-
defvalidate_fillstyle(
133-
s:Any,
134-
)->Literal["full","left","right","bottom","top","none"]: ...
132+
133+
validate_fillstyle:ValidateInStrings
134+
135135
defvalidate_fillstylelist(
136136
s:Any,
137137
)->list[Literal["full","left","right","bottom","top","none"]]: ...
@@ -152,3 +152,6 @@ def validate_hist_bins(
152152
)->Literal["auto","sturges","fd","doane","scott","rice","sqrt"]|int|list[
153153
float
154154
]: ...
155+
156+
# At runtime is added in __init__.py
157+
defaultParams:dict[str,Any]

‎lib/matplotlib/transforms.pyi

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,17 @@ class LockableBbox(BboxBase):
175175
deflocked_y1(self,y1:float|None)->None: ...
176176

177177
classTransform(TransformNode):
178-
input_dims:int|None
179-
output_dims:int|None
180-
is_separable:bool
181-
# Implemented as a standard attr in base class, but functionally readonly and some subclasses implement as such
178+
179+
# Implemented as a standard attrs in base class, but functionally readonly and some subclasses implement as such
180+
@property
181+
definput_dims(self)->int|None: ...
182+
@property
183+
defoutput_dims(self)->int|None: ...
184+
@property
185+
defis_separable(self)->bool: ...
182186
@property
183187
defhas_inverse(self)->bool: ...
188+
184189
def__add__(self,other:Transform)->Transform: ...
185190
@property
186191
defdepth(self)->int: ...
@@ -225,8 +230,6 @@ class Affine2DBase(AffineBase):
225230
input_dims:Literal[2]
226231
output_dims:Literal[2]
227232
deffrozen(self)->Affine2D: ...
228-
@property
229-
defis_separable(self): ...
230233
defto_values(self)->tuple[float,float,float,float,float,float]: ...
231234

232235
classAffine2D(Affine2DBase):
@@ -255,7 +258,6 @@ class _BlendedMixin:
255258
classBlendedGenericTransform(_BlendedMixin,Transform):
256259
input_dims:Literal[2]
257260
output_dims:Literal[2]
258-
is_separable:bool
259261
pass_through:bool
260262
def__init__(
261263
self,x_transform:Transform,y_transform:Transform,**kwargs
@@ -265,8 +267,6 @@ class BlendedGenericTransform(_BlendedMixin, Transform):
265267
defcontains_branch(self,other:Transform)->Literal[False]: ...
266268
@property
267269
defis_affine(self)->bool: ...
268-
@property
269-
defhas_inverse(self)->bool: ...
270270

271271
classBlendedAffine2D(_BlendedMixin,Affine2DBase):
272272
def__init__(
@@ -279,8 +279,6 @@ def blended_transform_factory(
279279

280280
classCompositeGenericTransform(Transform):
281281
pass_through:bool
282-
input_dims:int|None
283-
output_dims:int|None
284282
def__init__(self,a:Transform,b:Transform,**kwargs)->None: ...
285283

286284
classCompositeAffine2D(Affine2DBase):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp