summaryrefslogtreecommitdiff
path: root/doc/sphinxext/traitsdoc.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/traitsdoc.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/traitsdoc.py')
-rw-r--r--doc/sphinxext/traitsdoc.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/sphinxext/traitsdoc.py b/doc/sphinxext/traitsdoc.py
index 0fcf2c1cd..84753b4e5 100644
--- a/doc/sphinxext/traitsdoc.py
+++ b/doc/sphinxext/traitsdoc.py
@@ -25,6 +25,7 @@ from docscrape_sphinx import SphinxClassDoc, SphinxFunctionDoc, SphinxDocString
import numpydoc
import comment_eater
+import collections
class SphinxTraitsDoc(SphinxClassDoc):
def __init__(self, cls, modulename='', func_doc=SphinxFunctionDoc):
@@ -117,7 +118,7 @@ def get_doc_object(obj, what=None, config=None):
what = 'class'
elif inspect.ismodule(obj):
what = 'module'
- elif callable(obj):
+ elif isinstance(obj, collections.Callable):
what = 'function'
else:
what = 'object'