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

Skip to content

Commit 208db7b

Browse files
committed
DOC: Wrap first line of docstring if necessary.
The standard is to keep quotes on their own line if the docstring covers multiple lines.
1 parent 62e7b17 commit 208db7b

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

lib/matplotlib/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1296,7 +1296,8 @@ def _label_from_arg(y, default_name):
12961296

12971297

12981298
def _add_data_doc(docstring, replace_names):
1299-
"""Add documentation for a *data* field to the given docstring.
1299+
"""
1300+
Add documentation for a *data* field to the given docstring.
13001301
13011302
Parameters
13021303
----------

lib/matplotlib/cbook/__init__.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ def __hash__(self):
101101

102102

103103
class CallbackRegistry:
104-
"""Handle registering and disconnecting for a set of signals and callbacks:
104+
"""
105+
Handle registering and disconnecting for a set of signals and callbacks:
105106
106107
>>> def oneat(x):
107108
... print('eat', x)
@@ -1869,7 +1870,8 @@ def _lock_path(path):
18691870
def _topmost_artist(
18701871
artists,
18711872
_cached_max=functools.partial(max, key=operator.attrgetter("zorder"))):
1872-
"""Get the topmost artist of a list.
1873+
"""
1874+
Get the topmost artist of a list.
18731875
18741876
In case of a tie, return the *last* of the tied artists, as it will be
18751877
drawn on top of the others. `max` returns the first maximum in case of
@@ -1879,7 +1881,8 @@ def _topmost_artist(
18791881

18801882

18811883
def _str_equal(obj, s):
1882-
"""Return whether *obj* is a string equal to string *s*.
1884+
"""
1885+
Return whether *obj* is a string equal to string *s*.
18831886
18841887
This helper solely exists to handle the case where *obj* is a numpy array,
18851888
because in such cases, a naive ``obj == s`` would yield an array, which
@@ -1889,7 +1892,8 @@ def _str_equal(obj, s):
18891892

18901893

18911894
def _str_lower_equal(obj, s):
1892-
"""Return whether *obj* is a string equal, when lowercased, to string *s*.
1895+
"""
1896+
Return whether *obj* is a string equal, when lowercased, to string *s*.
18931897
18941898
This helper solely exists to handle the case where *obj* is a numpy array,
18951899
because in such cases, a naive ``obj == s`` would yield an array, which
@@ -1899,7 +1903,8 @@ def _str_lower_equal(obj, s):
18991903

19001904

19011905
def _define_aliases(alias_d, cls=None):
1902-
"""Class decorator for defining property aliases.
1906+
"""
1907+
Class decorator for defining property aliases.
19031908
19041909
Use as ::
19051910
@@ -2094,7 +2099,8 @@ def _array_patch_perimeters(x, rstride, cstride):
20942099

20952100
@contextlib.contextmanager
20962101
def _setattr_cm(obj, **kwargs):
2097-
"""Temporarily set some attributes; restore original state at context exit.
2102+
"""
2103+
Temporarily set some attributes; restore original state at context exit.
20982104
"""
20992105
sentinel = object()
21002106
origs = [(attr, getattr(obj, attr, sentinel)) for attr in kwargs]

lib/matplotlib/font_manager.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,7 @@ def win32InstalledFonts(directory=None, fontext='ttf'):
255255

256256
@lru_cache()
257257
def _call_fc_list():
258-
"""Cache and list the font filenames known to `fc-list`.
259-
"""
258+
"""Cache and list the font filenames known to `fc-list`."""
260259
# Delay the warning by 5s.
261260
timer = Timer(5, lambda: _log.warning(
262261
'Matplotlib is building the font cache using fc-list. '

0 commit comments

Comments
 (0)