summaryrefslogtreecommitdiff
path: root/sphinx/pycode/parser.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2018-12-16 19:46:47 +0900
committerGitHub <noreply@github.com>2018-12-16 19:46:47 +0900
commit2597c4174e386552449991a0a247340de3dbcdcc (patch)
tree9941080af8cb6e672846c0030ed621c31204fd1f /sphinx/pycode/parser.py
parent6395c7d242eda62d0803aa656de82267ebea1a47 (diff)
parentade973f4e376e6eb573be70fcce4f9b21faec500 (diff)
downloadsphinx-git-2597c4174e386552449991a0a247340de3dbcdcc.tar.gz
Merge pull request #5796 from jdufresne/super
Use Python 3 super() argument-less syntax
Diffstat (limited to 'sphinx/pycode/parser.py')
-rw-r--r--sphinx/pycode/parser.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/sphinx/pycode/parser.py b/sphinx/pycode/parser.py
index 71d7df781..71630aa3d 100644
--- a/sphinx/pycode/parser.py
+++ b/sphinx/pycode/parser.py
@@ -196,7 +196,7 @@ class AfterCommentParser(TokenProcessor):
def __init__(self, lines):
# type: (List[str]) -> None
- super(AfterCommentParser, self).__init__(lines)
+ super().__init__(lines)
self.comment = None # type: str
def fetch_rvalue(self):
@@ -249,7 +249,7 @@ class VariableCommentPicker(ast.NodeVisitor):
self.comments = {} # type: Dict[Tuple[str, str], str]
self.previous = None # type: ast.AST
self.deforders = {} # type: Dict[str, int]
- super(VariableCommentPicker, self).__init__()
+ super().__init__()
def add_entry(self, name):
# type: (str) -> None
@@ -293,7 +293,7 @@ class VariableCommentPicker(ast.NodeVisitor):
def visit(self, node):
# type: (ast.AST) -> None
"""Updates self.previous to ."""
- super(VariableCommentPicker, self).visit(node)
+ super().visit(node)
self.previous = node
def visit_Assign(self, node):
@@ -388,7 +388,7 @@ class VariableCommentPicker(ast.NodeVisitor):
class DefinitionFinder(TokenProcessor):
def __init__(self, lines):
# type: (List[str]) -> None
- super(DefinitionFinder, self).__init__(lines)
+ super().__init__(lines)
self.decorator = None # type: Token
self.context = [] # type: List[str]
self.indents = [] # type: List