Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
DOC: Fixed linting errors in cbook.py
  • Loading branch information
star1327p authored Feb 14, 2025
commit 76dd8be040550839c79e89d4ee52b78d3a12f551
16 changes: 12 additions & 4 deletions lib/matplotlib/cbook.py
Original file line number Diff line number Diff line change
Expand Up @@ -850,11 +850,15 @@ def join(self, a, *args):
mapping[elem] = set_a

def joined(self, a, b):
"""Return whether *a* and *b* are members of the same set."""
"""
Return whether *a* and *b* are members of the same set.
"""

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is not necessary, in fact the original one conforms to our style https://matplotlib.org/devdocs/devel/document.html#quote-positions. Please revert.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@timhoffm I manually changed it back in comment 08982e9

return (self._mapping.get(a, object()) is self._mapping.get(b))

def remove(self, a):
"""Remove *a* from the grouper, doing nothing if it is not there."""
"""
Remove *a* from the grouper, doing nothing if it is not there.
"""

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@timhoffm I manually changed it back in comment 08982e9

self._mapping.pop(a, {a}).remove(a)
self._ordering.pop(a, None)

Expand All @@ -881,10 +885,14 @@ def __init__(self, grouper): self._grouper = grouper
def __contains__(self, item): return item in self._grouper
def __iter__(self): return iter(self._grouper)
def joined(self, a, b):
Comment thread
star1327p marked this conversation as resolved.
"""Return whether *a* and *b* are members of the same set."""
"""
Return whether *a* and *b* are members of the same set.
"""
return self._grouper.joined(a, b)
def get_siblings(self, a):
Comment thread
star1327p marked this conversation as resolved.
"""Return all of the items joined with *a*, including itself."""
"""
Return all of the items joined with *a*, including itself.
"""
return self._grouper.get_siblings(a)


Expand Down