Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

DOC: Add docstrings to matplotlib.cbook.GrouperView#29617

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
timhoffm merged 7 commits intomatplotlib:mainfromstar1327p:add-docstring-cbook-api
Feb 14, 2025
Merged
Changes from3 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
20 changes: 16 additions & 4 deletionslib/matplotlib/cbook.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -850,11 +850,15 @@
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
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 stylehttps://matplotlib.org/devdocs/devel/document.html#quote-positions. Please revert.

Copy link
ContributorAuthor

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 comment08982e9

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
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
ContributorAuthor

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 comment08982e9

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

Expand All@@ -880,8 +884,16 @@
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): return self._grouper.joined(a, b)
def get_siblings(self, a): return self._grouper.get_siblings(a)
def joined(self, a, b):

Check failure on line 887 in lib/matplotlib/cbook.py

View workflow job for this annotation

GitHub Actions/ flake8

[flake8] reported by reviewdog 🐶E301 expected 1 blank line, found 0Raw Output:./lib/matplotlib/cbook.py:887:5: E301 expected 1 blank line, found 0
"""
Return whether *a* and *b* are members of the same set.
"""
return self._grouper.joined(a, b)
def get_siblings(self, a):

Check failure on line 892 in lib/matplotlib/cbook.py

View workflow job for this annotation

GitHub Actions/ flake8

[flake8] reported by reviewdog 🐶E301 expected 1 blank line, found 0Raw Output:./lib/matplotlib/cbook.py:892:5: E301 expected 1 blank line, found 0
"""
Return all of the items joined with *a*, including itself.
"""
return self._grouper.get_siblings(a)


def simple_linear_interpolation(a, steps):
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp