-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Disable numpydoc and use autosummary instead * Add toctree for accessors
- Loading branch information
Showing
3 changed files
with
40 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,32 @@ | ||
{% extends "!autosummary/class.rst" %} | ||
{{ fullname | escape | underline}} | ||
|
||
{% block methods %} | ||
{% if methods %} | ||
.. currentmodule:: {{ module }} | ||
|
||
.. | ||
HACK -- the point here is that we don't want this to appear in the output, but the autosummary should still generate the pages. | ||
.. autosummary:: | ||
:toctree: | ||
{% for item in all_methods %} | ||
{%- if not item.startswith('_') or item in ['__call__'] %} | ||
{{ name }}.{{ item }} | ||
{%- endif -%} | ||
{%- endfor %} | ||
.. autoclass:: {{ objname }} | ||
|
||
{% endif %} | ||
{% endblock %} | ||
{% block methods %} | ||
|
||
{% block attributes %} | ||
{% if attributes %} | ||
{% block attributes %} | ||
{% if attributes %} | ||
.. rubric:: {{ _('Attributes') }} | ||
|
||
.. | ||
HACK -- the point here is that we don't want this to appear in the output, but the autosummary should still generate the pages. | ||
.. autosummary:: | ||
:toctree: | ||
{% for item in all_attributes %} | ||
{%- if not item.startswith('_') %} | ||
{{ name }}.{{ item }} | ||
{%- endif -%} | ||
{%- endfor %} | ||
{% for item in attributes %} | ||
{% if item in members and not item.startswith('_') %} | ||
~{{ name }}.{{ item }} | ||
{% endif %} | ||
{%- endfor %} | ||
{% endif %} | ||
{% endblock %} | ||
|
||
{% if methods %} | ||
.. rubric:: {{ _('Methods') }} | ||
|
||
{% endif %} | ||
{% endblock %} | ||
.. autosummary:: | ||
{% for item in methods %} | ||
{% if item in members and (not item.startswith('_') or item in ['__call__']) %} | ||
~{{ name }}.{{ item }} | ||
{% endif %} | ||
{%- endfor %} | ||
{% endif %} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters