Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Milestone
Description
Bug summary
The return type foradd_subplots
withprojection="3d"
should beAxes3D
.
The current implementation is:
@overloaddefadd_subplot(self,nrows:int,ncols:int,index:int|tuple[int,int],**kwargs )->Axes: ...@overloaddefadd_subplot(self,pos:int,**kwargs)->Axes: ...@overloaddefadd_subplot(self,ax:Axes,**kwargs)->Axes: ...@overloaddefadd_subplot(self,ax:SubplotSpec,**kwargs)->Axes: ...@overloaddefadd_subplot(self,**kwargs)->Axes: ...@overloaddefsubplots(
Code for reproduction
importmatplotlib.pyplotaspltfrommpl_toolkits.mplot3d.axes3dimportAxes3Dax:Axes3D=plt.figure().add_subplot(projection="3d")
Actual outcome
Pyright complains:
error: Type "Axes" is not assignable to declared type "Axes3D" "Axes" is not assignable to "Axes3D" (reportAssignmentType)
Expected outcome
No error.
Additional information
No response
Operating system
No response
Matplotlib Version
3.10.0
Matplotlib Backend
No response
Python version
No response
Jupyter version
No response
Installation
None
Metadata
Metadata
Assignees
Labels
No labels