diff options
author | Jon Dufresne <jon.dufresne@gmail.com> | 2018-12-15 08:25:47 -0800 |
---|---|---|
committer | Jon Dufresne <jon.dufresne@gmail.com> | 2018-12-15 08:35:55 -0800 |
commit | ade973f4e376e6eb573be70fcce4f9b21faec500 (patch) | |
tree | 5d185c9a880e77db1e4a73131afaae90b1ad1c77 /sphinx/util/docutils.py | |
parent | 6113261948523ef6cad74621dec10e0cbf0189c7 (diff) | |
download | sphinx-git-ade973f4e376e6eb573be70fcce4f9b21faec500.tar.gz |
Use Python 3 super() argument-less syntax
The form is less verbose and more idiomatic for Python 3 only code.
https://docs.python.org/3/library/functions.html#super
Diffstat (limited to 'sphinx/util/docutils.py')
-rw-r--r-- | sphinx/util/docutils.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sphinx/util/docutils.py b/sphinx/util/docutils.py index 3e36565f7..9e2ee740a 100644 --- a/sphinx/util/docutils.py +++ b/sphinx/util/docutils.py @@ -289,8 +289,8 @@ class LoggingReporter(Reporter): error_handler='backslashreplace'): # type: (str, int, int, bool, str) -> None stream = cast(IO, WarningStream()) - super(LoggingReporter, self).__init__(source, report_level, halt_level, - stream, debug, error_handler=error_handler) + super().__init__(source, report_level, halt_level, + stream, debug, error_handler=error_handler) class NullReporter(Reporter): @@ -298,7 +298,7 @@ class NullReporter(Reporter): def __init__(self): # type: () -> None - super(NullReporter, self).__init__('', 999, 4) + super().__init__('', 999, 4) def is_html5_writer_available(): @@ -349,7 +349,7 @@ class SphinxFileOutput(FileOutput): def __init__(self, **kwargs): # type: (Any) -> None self.overwrite_if_changed = kwargs.pop('overwrite_if_changed', False) - super(SphinxFileOutput, self).__init__(**kwargs) + super().__init__(**kwargs) def write(self, data): # type: (str) -> str @@ -360,7 +360,7 @@ class SphinxFileOutput(FileOutput): if f.read() == data: return data - return super(SphinxFileOutput, self).write(data) + return super().write(data) class SphinxDirective(Directive): @@ -396,7 +396,7 @@ class SphinxTranslator(nodes.NodeVisitor): def __init__(self, builder, document): # type: (Builder, nodes.document) -> None - super(SphinxTranslator, self).__init__(document) + super().__init__(document) self.builder = builder self.config = builder.config self.settings = document.settings |