summaryrefslogtreecommitdiff
path: root/doc/sphinxext/linkcode.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/linkcode.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/linkcode.py')
-rw-r--r--doc/sphinxext/linkcode.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/sphinxext/linkcode.py b/doc/sphinxext/linkcode.py
index 1b1ef4a77..f1dffd337 100644
--- a/doc/sphinxext/linkcode.py
+++ b/doc/sphinxext/linkcode.py
@@ -10,6 +10,7 @@
"""
import warnings
+import collections
warnings.warn("This extension has been submitted to Sphinx upstream. "
"Use the version from there if it is accepted "
"https://bitbucket.org/birkenfeld/sphinx/pull-request/47/sphinxextlinkcode",
@@ -29,7 +30,7 @@ def doctree_read(app, doctree):
env = app.builder.env
resolve_target = getattr(env.config, 'linkcode_resolve', None)
- if not callable(env.config.linkcode_resolve):
+ if not isinstance(env.config.linkcode_resolve, collections.Callable):
raise LinkcodeError(
"Function `linkcode_resolve` is not given in conf.py")