-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Limit documenting special members to __call__ #20081
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
Conversation
Fails with only one warning:
|
@@ -7,7 +7,7 @@ | |||
{% if objtype in ['class'] %} | |||
.. auto{{ objtype }}:: {{ objname }} | |||
:show-inheritance: | |||
:special-members: | |||
:special-members: __call__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:special-members: __call__ | |
:special-members: __call__,__init__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not great. We don't want all the __init__
in the docs (https://57666-1385122-gh.circle-artifacts.com/0/doc/build/html/search.html?q=__init__). It's information is already available in the class docstring, e.g.
51bc5e5
to
4386c2a
Compare
Closes matplotlib#20080. Follow up to matplotlib#17151.
4386c2a
to
989553e
Compare
@@ -707,7 +707,7 @@ Then in any function accepting `~.Line2D` pass-through ``kwargs``, e.g., | |||
""" | |||
|
|||
Note there is a problem for `~matplotlib.artist.Artist` ``__init__`` methods, | |||
e.g., `matplotlib.patches.Patch.__init__`, which supports ``Patch`` ``kwargs``, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't link __init__
as this is not an explicit entry in the docs. It's contents is folded into the class docstring.
Let's try and see if this works.
Closes #20080.
Follow up to #17151.