diff options
author | njsmith <njs@pobox.com> | 2013-02-28 12:10:05 -0800 |
---|---|---|
committer | njsmith <njs@pobox.com> | 2013-02-28 12:10:05 -0800 |
commit | 4b361f62be7f750dc385d0b7dc7529ad9af5e4ea (patch) | |
tree | cbe8daa0a9806b2fa84e35d55af391f97a9ced98 /doc/sphinxext/numpydoc.py | |
parent | e1c7c4df0c7afb0baff683c7e3a1f4b205d6e572 (diff) | |
parent | dd13084557f46343b9fac0c02725a826d0ca397b (diff) | |
download | numpy-4b361f62be7f750dc385d0b7dc7529ad9af5e4ea.tar.gz |
Merge pull request #3047 from charris/2to3-callable
2to3: Fix callable.
Diffstat (limited to 'doc/sphinxext/numpydoc.py')
-rw-r--r-- | doc/sphinxext/numpydoc.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/sphinxext/numpydoc.py b/doc/sphinxext/numpydoc.py index 7679352c2..dd0c59b8d 100644 --- a/doc/sphinxext/numpydoc.py +++ b/doc/sphinxext/numpydoc.py @@ -17,6 +17,7 @@ It will: """ import sphinx +import collections if sphinx.__version__ < '1.0.1': raise RuntimeError("Sphinx 1.0.1 or newer is required") @@ -82,7 +83,7 @@ def mangle_signature(app, what, name, obj, options, sig, retann): 'initializes x; see ' in pydoc.getdoc(obj.__init__))): return '', '' - if not (callable(obj) or hasattr(obj, '__argspec_is_invalid_')): return + if not (isinstance(obj, collections.Callable) or hasattr(obj, '__argspec_is_invalid_')): return if not hasattr(obj, '__doc__'): return doc = SphinxDocString(pydoc.getdoc(obj)) |