diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2017-10-19 10:11:20 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2017-10-19 10:11:20 +0900 |
commit | dc0c547b81628b958d6855e502f2bbed61ef3d85 (patch) | |
tree | aa22a8e8634a6b5ccc4ef741ed1963b8dcb35bbc /sphinx/pycode/parser.py | |
parent | 1dfe978fcb60c4ba4c30914f5c2f4916123d91b3 (diff) | |
download | sphinx-git-dc0c547b81628b958d6855e502f2bbed61ef3d85.tar.gz |
Fix flake8 and mypy violations
Diffstat (limited to 'sphinx/pycode/parser.py')
-rw-r--r-- | sphinx/pycode/parser.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/pycode/parser.py b/sphinx/pycode/parser.py index a22891fd7..28da09c78 100644 --- a/sphinx/pycode/parser.py +++ b/sphinx/pycode/parser.py @@ -53,7 +53,7 @@ def get_lvar_names(node, self=None): raise TypeError('The assignment %r is not instance variable' % node) elif node_name in ('Tuple', 'List'): members = [] - for elt in node.elts: + for elt in node.elts: # type: ignore try: members.extend(get_lvar_names(elt, self)) except TypeError: @@ -286,7 +286,7 @@ class VariableCommentPicker(ast.NodeVisitor): try: varnames = sum([get_lvar_names(t, self=self.get_self()) for t in node.targets], []) # type: ignore # NOQA current_line = self.get_line(node.lineno) - except TypeError as exc: + except TypeError: return # this assignment is not new definition! # check comments after assignment |