Skip to content

Commit f94fce6

Browse files
star1327ptimhoffm
andauthored
DOC: Add docstrings to matplotlib.cbook.GrouperView (#29617)
* DOC: Add docstrings to matplotlib.cbook.GrouperView * DOC: Fixed linting errors in cbook.py * Update cbook.py Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> * Update cbook.py Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> * Revert unnecessary changes * Removed unnecessary whitespace --------- Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
1 parent c7e286e commit f94fce6

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

lib/matplotlib/cbook.py

+12-2
Original file line numberDiff line numberDiff line change
@@ -880,8 +880,18 @@ class GrouperView:
880880
def __init__(self, grouper): self._grouper = grouper
881881
def __contains__(self, item): return item in self._grouper
882882
def __iter__(self): return iter(self._grouper)
883-
def joined(self, a, b): return self._grouper.joined(a, b)
884-
def get_siblings(self, a): return self._grouper.get_siblings(a)
883+
884+
def joined(self, a, b):
885+
"""
886+
Return whether *a* and *b* are members of the same set.
887+
"""
888+
return self._grouper.joined(a, b)
889+
890+
def get_siblings(self, a):
891+
"""
892+
Return all of the items joined with *a*, including itself.
893+
"""
894+
return self._grouper.get_siblings(a)
885895

886896

887897
def simple_linear_interpolation(a, steps):

0 commit comments

Comments
 (0)