Skip to content

Commit

Permalink
Update docstring.
Browse files Browse the repository at this point in the history
  • Loading branch information
daizutabi committed Jun 16, 2020
1 parent 2a7891a commit d77af75
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

## [Unreleased]

* BugFix: Include decorated functions if decorator uses `wraps()`.
* `all` filter for package or module to display all of the members and add links.
* BugFix: Include decorated functions if decorator uses `functools.wraps()`.
* `all` filter for package or module to display all of the members and add links to them.

## Version 1.0.3 (2020-06-16)

Expand Down
8 changes: 4 additions & 4 deletions mkapi/core/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ class Base:

name: str = "" #: Name of self.
markdown: str = "" #: Markdown source.
html: str = field(default="", init=False) #: HTML string after conversion.
html: str = field(default="", init=False) #: HTML output after conversion.
callback: Optional[Callable[["Base"], str]] = field(default=None, init=False)
"""Callback function to modify HTML string."""
"""Callback function to modify HTML output."""

def __repr__(self):
class_name = self.__class__.__name__
Expand All @@ -45,10 +45,10 @@ def __iter__(self) -> Iterator["Base"]:
yield self

def set_html(self, html: str):
"""Sets HTML string.
"""Sets HTML output.
Args:
html: HTML string.
html: HTML output.
"""
self.html = html
if self.callback:
Expand Down
2 changes: 1 addition & 1 deletion mkapi/core/docstring.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def parse_source(doc: Docstring, obj: Any):
('name', 'str, optional', 'Name of self.')
>>> section = doc['Attributes']
>>> section['html'].to_tuple()
('html', 'str', 'HTML string after conversion.')
('html', 'str', 'HTML output after conversion.')
s = get_signature(Base)
s['Parameters']
Expand Down
2 changes: 1 addition & 1 deletion mkapi/core/signature.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def set_attributes(self):
>>> s.parameters['name'].to_tuple()
('name', 'str, optional', 'Name of self.')
>>> s.attributes['html'].to_tuple()
('html', 'str', 'HTML string after conversion.')
('html', 'str', 'HTML output after conversion.')
"""
items = []
for name, (type, description) in get_attributes(self.obj).items():
Expand Down
8 changes: 4 additions & 4 deletions theme/site/api/mkapi.core.base/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ <h2 id="mkapicorebasebase" class="mkapi-object mkapi-object-dataclass code">

<li><code class="mkapi-args-name">html</code>
<span class="mkapi-args-type">(str)</span>
<span class="mkapi-args-dash">&mdash;</span> <span class="mkapi-args-desc">HTML string after conversion.</span></li>
<span class="mkapi-args-dash">&mdash;</span> <span class="mkapi-args-desc">HTML output after conversion.</span></li>

</ul></div>
</div>
Expand Down Expand Up @@ -345,7 +345,7 @@ <h3 id="mkapicorebasebaseset_html" class="mkapi-object mkapi-object-method code"

<li><code class="mkapi-args-name">html</code>
<span class="mkapi-args-type">(str)</span>
<span class="mkapi-args-dash">&mdash;</span> <span class="mkapi-args-desc">HTML string.</span></li>
<span class="mkapi-args-dash">&mdash;</span> <span class="mkapi-args-desc">HTML output.</span></li>

</ul></div>
</div>
Expand Down Expand Up @@ -953,7 +953,7 @@ <h3 id="mkapicorebasebaseset_html_1" class="mkapi-object mkapi-object-method cod

<li><code class="mkapi-args-name">html</code>
<span class="mkapi-args-type">(str)</span>
<span class="mkapi-args-dash">&mdash;</span> <span class="mkapi-args-desc">HTML string.</span></li>
<span class="mkapi-args-dash">&mdash;</span> <span class="mkapi-args-desc">HTML output.</span></li>

</ul></div>
</div>
Expand Down Expand Up @@ -1297,7 +1297,7 @@ <h3 id="mkapicorebasebaseset_html_2" class="mkapi-object mkapi-object-method cod

<li><code class="mkapi-args-name">html</code>
<span class="mkapi-args-type">(str)</span>
<span class="mkapi-args-dash">&mdash;</span> <span class="mkapi-args-desc">HTML string.</span></li>
<span class="mkapi-args-dash">&mdash;</span> <span class="mkapi-args-desc">HTML output.</span></li>

</ul></div>
</div>
Expand Down
8 changes: 4 additions & 4 deletions theme/site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ <h3 id="mkapicorebasebase" class="mkapi-object mkapi-object-dataclass plain">

<li><code class="mkapi-args-name">html</code>
<span class="mkapi-args-type">(str)</span>
<span class="mkapi-args-dash">&mdash;</span> <span class="mkapi-args-desc">HTML string after conversion.</span></li>
<span class="mkapi-args-dash">&mdash;</span> <span class="mkapi-args-desc">HTML output after conversion.</span></li>

</ul></div>
</div>
Expand Down Expand Up @@ -290,7 +290,7 @@ <h4 id="mkapicorebasebaseset_html" class="mkapi-object mkapi-object-method code"

<li><code class="mkapi-args-name">html</code>
<span class="mkapi-args-type">(str)</span>
<span class="mkapi-args-dash">&mdash;</span> <span class="mkapi-args-desc">HTML string.</span></li>
<span class="mkapi-args-dash">&mdash;</span> <span class="mkapi-args-desc">HTML output.</span></li>

</ul></div>
</div>
Expand Down Expand Up @@ -348,7 +348,7 @@ <h4 id="mkapicorebasebaseset_html" class="mkapi-object mkapi-object-method code"

<li><code class="mkapi-args-name">html</code>
<span class="mkapi-args-type">(str)</span>
<span class="mkapi-args-dash">&mdash;</span> <span class="mkapi-args-desc">HTML string after conversion.</span></li>
<span class="mkapi-args-dash">&mdash;</span> <span class="mkapi-args-desc">HTML output after conversion.</span></li>

</ul></div>
</div>
Expand Down Expand Up @@ -398,7 +398,7 @@ <h4 id="mkapicorebasebaseset_html" class="mkapi-object mkapi-object-method code"

<li><code class="mkapi-args-name">html</code>
<span class="mkapi-args-type">(str)</span>
<span class="mkapi-args-dash">&mdash;</span> <span class="mkapi-args-desc">HTML string.</span></li>
<span class="mkapi-args-dash">&mdash;</span> <span class="mkapi-args-desc">HTML output.</span></li>

</ul></div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion theme/site/search/search_index.json

Large diffs are not rendered by default.

0 comments on commit d77af75

Please sign in to comment.