Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix various numpydoc style issues #16858

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

Merged
merged 7 commits into from
Mar 21, 2020
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 3 additions & 1 deletion lib/matplotlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1296,7 +1296,8 @@ def _label_from_arg(y, default_name):


def _add_data_doc(docstring, replace_names):
"""Add documentation for a *data* field to the given docstring.
"""
Add documentation for a *data* field to the given docstring.

Parameters
----------
Expand All @@ -1309,6 +1310,7 @@ def _add_data_doc(docstring, replace_names):

Returns
-------
str
The augmented docstring.
"""
if (docstring is None
Expand Down
6 changes: 3 additions & 3 deletions lib/matplotlib/afm.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,13 +286,13 @@ def _parse_composites(fh):

Returns
-------
composites : dict
dict
A dict mapping composite character names to a parts list. The parts
list is a list of `.CompositePart` entries describing the parts of
the composite.

Example
-------
Examples
--------
A composite definition line::

CC Aacute 2 ; PCC A 0 0 ; PCC acute 160 170 ;
Expand Down
4 changes: 2 additions & 2 deletions lib/matplotlib/animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def is_available(self, name):

Returns
-------
available : bool
bool
"""
try:
cls = self._registered[name]
Expand Down Expand Up @@ -1281,7 +1281,7 @@ def to_html5_video(self, embed_limit=None):

Returns
-------
video_tag : str
str
An HTML5 video tag with the animation embedded as base64 encoded
h264 video.
If the *embed_limit* is exceeded, this returns the string
Expand Down
10 changes: 5 additions & 5 deletions lib/matplotlib/artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def get_tightbbox(self, renderer):

Returns
-------
bbox : `.Bbox`
`.Bbox`
The enclosing bounding box (in figure pixel coordinates).
"""
bbox = self.get_window_extent(renderer)
Expand Down Expand Up @@ -305,7 +305,7 @@ def func(artist: Artist) -> Any

Returns
-------
oid : int
int
The observer id associated with the callback. This id can be
used for removing the callback with `.remove_callback` later.

Expand Down Expand Up @@ -629,7 +629,7 @@ def get_sketch_params(self):

Returns
-------
sketch_params : tuple or None
tuple or None

A 3-tuple with the following elements:

Expand Down Expand Up @@ -1109,7 +1109,7 @@ def findobj(self, match=None, include_self=True):

Returns
-------
artists : list of `.Artist`
list of `.Artist`

"""
if match is None: # always return True
Expand Down Expand Up @@ -1599,7 +1599,7 @@ def kwdoc(artist):

Returns
-------
string
str
The settable properties of *artist*, as plain text if
:rc:`docstring.hardcopy` is False and as a rst table (intended for
use in Sphinx) if it is True.
Expand Down
Loading