[Bug]: Incorrect type stub for ErrorbarContainer
's lines
attribute.
#28467
Milestone
ErrorbarContainer
's lines
attribute.
#28467
Uh oh!
There was an error while loading. Please reload this page.
Bug summary
The type stub for
ErrorbarContainer
inlib/matplotlib/container.pyi
is incorrect.It is also inconsistent with the online documentation.
Code for reproduction
Actual outcome
Expected outcome
Assuming the type stub is correct:
Line2D
which is correctLine2D
which is incorrect as it is actually an empty tupleLineCollection
which is incorrect as it is a tuple containing a singleLineCollection
.Additional information
I'm not sure if the type stub was always incorrect or it became incorrect over time however it should be fixed as it causes spurious type checker errors.
Obviously we would need to fix the type stub annotation however I am unsure about the true types as it seems that the return types are dynamic dependent on the input arguments to plt.errorbar.
Operating system
Debian
Matplotlib Version
3.8.4
Matplotlib Backend
QtAgg
Python version
3.12.4
Jupyter version
Not applicable
Installation
conda
The text was updated successfully, but these errors were encountered: