-
Notifications
You must be signed in to change notification settings - Fork 616
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automatically add type annotations to all API functions
- Loading branch information
1 parent
1550326
commit 8ddb075
Showing
10 changed files
with
220 additions
and
125 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,3 +1,25 @@ | ||
.small { | ||
font-size:40%; | ||
} | ||
|
||
.rst-content dl:not(.docutils) dl dt { | ||
/* mimick numpydoc’s blockquote style */ | ||
font-weight: normal; | ||
background: none transparent; | ||
border-left: none; | ||
margin: 0 0 12px; | ||
padding: 3px 0 0; | ||
font-size: 100%; | ||
} | ||
|
||
.rst-content dl:not(.docutils) dl dt code { | ||
font-size: 100%; | ||
font-weight: normal; | ||
background: none transparent; | ||
border: none; | ||
padding: 0 2px; | ||
} | ||
|
||
.rst-content dl:not(.docutils) dl dt a.reference>code { | ||
text-decoration: underline; | ||
} |
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,30 +1,35 @@ | ||
{% extends "!autosummary/class.rst" %} | ||
|
||
.. this is from numpy's documentation; why does autosummary not create the pages | ||
for the attributes? | ||
{% block methods %} | ||
{% if methods %} | ||
.. 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 %} | ||
{% endif %} | ||
{% endblock %} | ||
|
||
{% block attributes %} | ||
{% if 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 %} | ||
{% endif %} | ||
{% endblock %} | ||
:github_url: {{ fullname | modurl }} | ||
|
||
{{ fullname | escape | underline}} | ||
|
||
.. currentmodule:: {{ module }} | ||
|
||
.. add toctree option to make autodoc generate the pages | ||
.. autoclass:: {{ objname }} | ||
|
||
{% block attributes %} | ||
{% if attributes %} | ||
.. rubric:: Attributes | ||
|
||
.. autosummary:: | ||
:toctree: . | ||
{% for item in attributes %} | ||
~{{ fullname }}.{{ item }} | ||
{%- endfor %} | ||
{% endif %} | ||
{% endblock %} | ||
|
||
{% block methods %} | ||
{% if methods %} | ||
.. rubric:: Methods | ||
|
||
.. autosummary:: | ||
:toctree: . | ||
{% for item in methods %} | ||
{%- if item != '__init__' %} | ||
~{{ fullname }}.{{ 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
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
Oops, something went wrong.