summaryrefslogtreecommitdiff
path: root/sphinx/addnodes.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2018-11-28 01:57:48 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2018-11-28 01:58:32 +0900
commit31c4d06a22e92d28f94200063a3921b688e330c2 (patch)
tree21777fb0c6c102a0533eab65d40e700e79ea0c4e /sphinx/addnodes.py
parentc76885631ddf9edbf4e6edcc37ebc29e3e583627 (diff)
downloadsphinx-git-31c4d06a22e92d28f94200063a3921b688e330c2.tar.gz
refactor: Use super() to call methods of superclass
Diffstat (limited to 'sphinx/addnodes.py')
-rw-r--r--sphinx/addnodes.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/sphinx/addnodes.py b/sphinx/addnodes.py
index 1a24057bc..5d45aa44d 100644
--- a/sphinx/addnodes.py
+++ b/sphinx/addnodes.py
@@ -127,7 +127,7 @@ class desc_returns(desc_type):
"""Node for a "returns" annotation (a la -> in Python)."""
def astext(self):
# type: () -> unicode
- return ' -> ' + nodes.TextElement.astext(self)
+ return ' -> ' + super(desc_returns, self).astext()
class desc_name(nodes.Part, nodes.Inline, nodes.FixedTextElement):
@@ -149,7 +149,7 @@ class desc_optional(nodes.Part, nodes.Inline, nodes.FixedTextElement):
def astext(self):
# type: () -> unicode
- return '[' + nodes.TextElement.astext(self) + ']'
+ return '[' + super(desc_optional, self).astext() + ']'
class desc_annotation(nodes.Part, nodes.Inline, nodes.FixedTextElement):
@@ -209,7 +209,7 @@ class math(nodes.math):
RemovedInSphinx30Warning, stacklevel=2)
return self.astext()
else:
- return nodes.math.__getitem__(self, key)
+ return super(math, self).__getitem__(key)
class math_block(nodes.math_block):
@@ -228,7 +228,7 @@ class math_block(nodes.math_block):
RemovedInSphinx30Warning, stacklevel=2)
return self.astext()
else:
- return nodes.math_block.__getitem__(self, key)
+ return super(math_block, self).__getitem__(key)
class displaymath(math_block):