8000 Fix missing artist property reference for _CollectionWithSizes.set_sizes by timhoffm · Pull Request #29560 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Fix missing artist property reference for _CollectionWithSizes.set_sizes #29560

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 0 additions & 32 deletions doc/missing-references.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,38 +143,6 @@
]
},
"py:meth": {
"matplotlib.collections._CollectionWithSizes.set_sizes": [
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.barbs:180",
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.broken_barh:85",
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.fill_between:122",
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.fill_betweenx:122",
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.hexbin:218",
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.pcolor:187",
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.quiver:256",
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.scatter:174",
"lib/matplotlib/collections.py:docstring of matplotlib.artist.AsteriskPolygonCollection.set:45",
"lib/matplotlib/collections.py:docstring of matplotlib.artist.CircleCollection.set:45",
"lib/matplotlib/collections.py:docstring of matplotlib.artist.FillBetweenPolyCollection.set:46",
"lib/matplotlib/collections.py:docstring of matplotlib.artist.PathCollection.set:45",
"lib/matplotlib/collections.py:docstring of matplotlib.artist.PolyCollection.set:45",
"lib/matplotlib/collections.py:docstring of matplotlib.artist.PolyQuadMesh.set:45",
"lib/matplotlib/collections.py:docstring of matplotlib.artist.RegularPolyCollection.set:45",
"lib/matplotlib/collections.py:docstring of matplotlib.artist.StarPolygonCollection.set:45",
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.barbs:180",
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.broken_barh:85",
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.fill_between:122",
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.fill_betweenx:122",
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.hexbin:218",
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.pcolor:187",
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.quiver:256",
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.scatter:174",
"lib/matplotlib/quiver.py:docstring of matplotlib.artist.Barbs.set:46",
"lib/matplotlib/quiver.py:docstring of matplotlib.artist.Quiver.set:46",
"lib/matplotlib/quiver.py:docstring of matplotlib.quiver.Barbs:213",
"lib/matplotlib/quiver.py:docstring of matplotlib.quiver.Quiver:292",
"lib/mpl_toolkits/mplot3d/art3d.py:docstring of matplotlib.artist.Path3DCollection.set:47",
"lib/mpl_toolkits/mplot3d/art3d.py:docstring of matplotlib.artist.Poly3DCollection.set:46"
],
"matplotlib.collections._MeshData.set_array": [
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.pcolormesh:168",
"lib/matplotlib/collections.py:docstring of matplotlib.artist.PolyQuadMesh.set:17",
Expand Down
15 changes: 13 additions & 2 deletions lib/matplotlib/artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -1572,6 +1572,13 @@
'matplotlib.image._ImageBase.set_resample',
'matplotlib.text._AnnotationBase.set_annotation_clip',
}
_LINK_IN_CHILD_CLASS = {
# A set of property setter methods that are inherited, and where the
# original method is not part of the docs (e.g. because it's in a private
# base class which is not documented), but the method is documented in
# the class itself because of :inherited-members:.
'_CollectionWithSizes.set_sizes',
}

def aliased_name_rest(self, s, target):
"""
Expand Down Expand Up @@ -1640,8 +1647,12 @@
break
else: # No docstring available.
method = getattr(self.o, f"set_{prop}")
prop_and_qualnames.append(
(prop, f"{method.__module__}.{method.__qualname__}"))

if method.__qualname__ in self._LINK_IN_CHILD_CLASS:
qualname = f"{method.__module__}.{self.o.__name__}.{method.__name__}"

Check warning on line 1652 in lib/matplotlib/artist.py

View check run for this annotation

Codecov / codecov/patch

lib/matplotlib/artist.py#L1652

Added line #L1652 was not covered by tests
else:
qualname = f"{method.__module__}.{method.__qualname__}"
prop_and_qualnames.append((prop, qualname))

Check warning on line 1655 in lib/matplotlib/artist.py

View check run for this annotation

Codecov / codecov/patch

lib/matplotlib/artist.py#L1654-L1655

Added lines #L1654 - L1655 were not covered by tests

names = [self.aliased_name_rest(prop, target)
.replace('_base._AxesBase', 'Axes')
Expand Down
Loading
0