diff options
| author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-11-28 01:57:48 +0900 |
|---|---|---|
| committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-11-28 01:58:32 +0900 |
| commit | 31c4d06a22e92d28f94200063a3921b688e330c2 (patch) | |
| tree | 21777fb0c6c102a0533eab65d40e700e79ea0c4e /sphinx/addnodes.py | |
| parent | c76885631ddf9edbf4e6edcc37ebc29e3e583627 (diff) | |
| download | sphinx-git-31c4d06a22e92d28f94200063a3921b688e330c2.tar.gz | |
refactor: Use super() to call methods of superclass
Diffstat (limited to 'sphinx/addnodes.py')
| -rw-r--r-- | sphinx/addnodes.py | 8 |
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): |
