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

Skip to content

Commit 2342fa4

Browse files
committed
flake8
1 parent 9305094 commit 2342fa4

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

lib/matplotlib/artist.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1379,10 +1379,13 @@ def _get_tightbbox_for_layout_only(obj, *args, **kwargs):
13791379
except TypeError:
13801380
return obj.get_tightbbox(*args, **kwargs)
13811381

1382+
13821383
def getdoc_pure(object):
1383-
"""Get the documentation string for an object.
1384+
"""
1385+
Get the documentation string for an object.
13841386
1385-
This is similar to `inspect.getdoc`, expect that the function `inspect.cleandoc` is not applied.
1387+
This is equal to `inspect.getdoc`, expect that the
1388+
function `inspect.cleandoc` is not applied.
13861389
"""
13871390
try:
13881391
doc = object.__doc__
@@ -1397,6 +1400,7 @@ def getdoc_pure(object):
13971400
return None
13981401
return doc
13991402

1403+
14001404
class ArtistInspector:
14011405
"""
14021406
A helper class to inspect an `~matplotlib.artist.Artist` and return
@@ -1524,16 +1528,16 @@ def number_of_parameters(func):
15241528
return len(inspect.signature(func).parameters)
15251529

15261530
@staticmethod
1527-
@lru_cache(maxsize=0)
1531+
@lru_cache(maxsize=None)
15281532
def is_alias(class_):
15291533
"""Return whether method object *o* is an alias for another method."""
15301534

15311535
ds = getdoc_pure(class_)
15321536
if ds is None:
15331537
return False
15341538

1535-
# docstring can have leading lines of whitespace, or whitespace at start of the first line
1536-
ds=ds.lstrip()
1539+
# uncleaned docstring can have leading of whitespace
1540+
ds = ds.lstrip()
15371541

15381542
return ds.startswith('Alias for ')
15391543

0 commit comments

Comments
 (0)