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/directives/patches.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/directives/patches.py')
-rw-r--r-- | sphinx/directives/patches.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sphinx/directives/patches.py b/sphinx/directives/patches.py index 7992d30d9..9413c9385 100644 --- a/sphinx/directives/patches.py +++ b/sphinx/directives/patches.py @@ -32,7 +32,7 @@ class Figure(images.Figure): def run(self): # type: () -> List[nodes.Node] name = self.options.pop('name', None) - result = super(Figure, self).run() + result = super().run() if len(result) == 2 or isinstance(result[0], nodes.system_message): return result @@ -54,7 +54,7 @@ class Figure(images.Figure): class Meta(html.Meta, SphinxDirective): def run(self): # type: () -> List[nodes.Node] - result = super(Meta, self).run() + result = super().run() for node in result: if (isinstance(node, nodes.pending) and isinstance(node.details['nodes'][0], html.MetaBody.meta)): @@ -76,7 +76,7 @@ class RSTTable(tables.RSTTable): def make_title(self): # type: () -> Tuple[nodes.title, List[nodes.system_message]] - title, message = super(RSTTable, self).make_title() + title, message = super().make_title() if title: set_source_info(self, title) @@ -90,7 +90,7 @@ class CSVTable(tables.CSVTable): def make_title(self): # type: () -> Tuple[nodes.title, List[nodes.system_message]] - title, message = super(CSVTable, self).make_title() + title, message = super().make_title() if title: set_source_info(self, title) @@ -104,7 +104,7 @@ class ListTable(tables.ListTable): def make_title(self): # type: () -> Tuple[nodes.title, List[nodes.system_message]] - title, message = super(ListTable, self).make_title() + title, message = super().make_title() if title: set_source_info(self, title) |