Skip to content

Commit 7ad04bf

Browse files
committed
Merge pull request #42 from androomerrill/docscrape-bugfix
BUG: restore support for Python 3.4.
2 parents 452dae7 + 94d8d93 commit 7ad04bf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

numpydoc/docscrape.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,9 +473,9 @@ def __init__(self, func, role='func', doc=None, config={}):
473473
if not self['Signature'] and func is not None:
474474
func, func_name = self.get_func()
475475
try:
476-
if hasattr(inspect, 'signature'):
476+
try:
477477
signature = str(inspect.signature(func))
478-
else:
478+
except (AttributeError, ValueError):
479479
# try to read signature, backward compat for older Python
480480
if sys.version_info[0] >= 3:
481481
argspec = inspect.getfullargspec(func)

0 commit comments

Comments
 (0)