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/io.py | |
parent | c76885631ddf9edbf4e6edcc37ebc29e3e583627 (diff) | |
download | sphinx-git-31c4d06a22e92d28f94200063a3921b688e330c2.tar.gz |
refactor: Use super() to call methods of superclass
Diffstat (limited to 'sphinx/io.py')
-rw-r--r-- | sphinx/io.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sphinx/io.py b/sphinx/io.py index a0f3559ac..b35dcc73f 100644 --- a/sphinx/io.py +++ b/sphinx/io.py @@ -73,14 +73,14 @@ class SphinxBaseReader(standalone.Reader): def get_transforms(self): # type: () -> List[Type[Transform]] - return standalone.Reader.get_transforms(self) + self.transforms + return super(SphinxBaseReader, self).get_transforms() + self.transforms def new_document(self): # type: () -> nodes.document """Creates a new document object which having a special reporter object good for logging. """ - document = standalone.Reader.new_document(self) + document = super(SphinxBaseReader, self).new_document() # substitute transformer document.transformer = SphinxTransformer(document) @@ -187,7 +187,7 @@ class SphinxBaseFileInput(FileInput): After reading, it emits Sphinx event ``source-read``. """ - data = FileInput.read(self) + data = super(SphinxBaseFileInput, self).read() # emit source-read event arg = [data] @@ -254,7 +254,7 @@ class SphinxRSTFileInput(SphinxBaseFileInput): def read(self): # type: () -> StringList - inputstring = SphinxBaseFileInput.read(self) + inputstring = super(SphinxRSTFileInput, self).read() lines = string2lines(inputstring, convert_whitespace=True) content = StringList() for lineno, line in enumerate(lines): |