diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-09-22 22:54:15 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-09-22 22:54:15 +0900 |
commit | dc44b0d2a9c52b5c12843cb1a0a6e0aea3c7f4d2 (patch) | |
tree | ee090ebec55c1aa6c5b9e19bfbad1ae0bbfb8abe /sphinx/pycode/parser.py | |
parent | 490e4aed4145659dab000e86269bd7a3dc686318 (diff) | |
parent | b4fab4bf115af984a82b9c509decc0d1c5fe1c41 (diff) | |
download | sphinx-git-dc44b0d2a9c52b5c12843cb1a0a6e0aea3c7f4d2.tar.gz |
Merge branch 'master' into HEAD
Diffstat (limited to 'sphinx/pycode/parser.py')
-rw-r--r-- | sphinx/pycode/parser.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sphinx/pycode/parser.py b/sphinx/pycode/parser.py index ca0143f55..559083100 100644 --- a/sphinx/pycode/parser.py +++ b/sphinx/pycode/parser.py @@ -17,7 +17,7 @@ import tokenize from token import NAME, NEWLINE, INDENT, DEDENT, NUMBER, OP, STRING from tokenize import COMMENT, NL -from six import PY2, text_type +from six import text_type if False: # For type annotation @@ -59,10 +59,7 @@ def get_lvar_names(node, self=None): # => TypeError """ if self: - if PY2: - self_id = self.id # type: ignore - else: - self_id = self.arg + self_id = self.arg # type: ignore node_name = node.__class__.__name__ if node_name in ('Index', 'Num', 'Slice', 'Str', 'Subscript'): |