summaryrefslogtreecommitdiff
path: root/doc/sphinxext/docscrape_sphinx.py
diff options
context:
space:
mode:
authornjsmith <njs@pobox.com>2013-02-28 12:10:05 -0800
committernjsmith <njs@pobox.com>2013-02-28 12:10:05 -0800
commit4b361f62be7f750dc385d0b7dc7529ad9af5e4ea (patch)
treecbe8daa0a9806b2fa84e35d55af391f97a9ced98 /doc/sphinxext/docscrape_sphinx.py
parente1c7c4df0c7afb0baff683c7e3a1f4b205d6e572 (diff)
parentdd13084557f46343b9fac0c02725a826d0ca397b (diff)
downloadnumpy-4b361f62be7f750dc385d0b7dc7529ad9af5e4ea.tar.gz
Merge pull request #3047 from charris/2to3-callable
2to3: Fix callable.
Diffstat (limited to 'doc/sphinxext/docscrape_sphinx.py')
-rw-r--r--doc/sphinxext/docscrape_sphinx.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/sphinxext/docscrape_sphinx.py b/doc/sphinxext/docscrape_sphinx.py
index e44e770ef..273385475 100644
--- a/doc/sphinxext/docscrape_sphinx.py
+++ b/doc/sphinxext/docscrape_sphinx.py
@@ -1,6 +1,7 @@
import re, inspect, textwrap, pydoc
import sphinx
from docscrape import NumpyDocString, FunctionDoc, ClassDoc
+import collections
class SphinxDocString(NumpyDocString):
def __init__(self, docstring, config={}):
@@ -212,7 +213,7 @@ def get_doc_object(obj, what=None, doc=None, config={}):
what = 'class'
elif inspect.ismodule(obj):
what = 'module'
- elif callable(obj):
+ elif isinstance(obj, collections.Callable):
what = 'function'
else:
what = 'object'