summaryrefslogtreecommitdiff
path: root/sphinx/transforms.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/transforms.py')
-rw-r--r--sphinx/transforms.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/sphinx/transforms.py b/sphinx/transforms.py
index e28c75f6..49c00999 100644
--- a/sphinx/transforms.py
+++ b/sphinx/transforms.py
@@ -23,7 +23,6 @@ from sphinx.util import split_index_msg
from sphinx.util.nodes import traverse_translatable_index, extract_messages
from sphinx.util.osutil import ustrftime, find_catalog
from sphinx.util.compat import docutils_version
-from sphinx.util.pycompat import all
from sphinx.domains.std import (
make_term_from_paragraph_node,
make_termnodes_from_paragraph_node,
@@ -70,7 +69,7 @@ class MoveModuleTargets(Transform):
for node in self.document.traverse(nodes.target):
if not node['ids']:
continue
- if (node.has_key('ismod') and
+ if ('ismod' in node and
node.parent.__class__ is nodes.section and
# index 0 is the section title node
node.parent.index(node) == 1):