summaryrefslogtreecommitdiff
path: root/sphinx/pycode/parser.py
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2018-12-15 20:13:28 -0800
committerJon Dufresne <jon.dufresne@gmail.com>2018-12-18 16:23:10 -0800
commit6978918ffc14b0b096285adfa0c90f95de281efa (patch)
treea7ba01358ee56c41853c488dc5808818f08e79c6 /sphinx/pycode/parser.py
parent4405366e223246045fb2ca465a8a3ebac1feb0e8 (diff)
downloadsphinx-git-6978918ffc14b0b096285adfa0c90f95de281efa.tar.gz
Replace use of six.text_type with str
This removes the last use of the six package allowing Sphinx to remove it as a dependency.
Diffstat (limited to 'sphinx/pycode/parser.py')
-rw-r--r--sphinx/pycode/parser.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/sphinx/pycode/parser.py b/sphinx/pycode/parser.py
index ec04aecab..8aa2815d0 100644
--- a/sphinx/pycode/parser.py
+++ b/sphinx/pycode/parser.py
@@ -16,8 +16,6 @@ import tokenize
from token import NAME, NEWLINE, INDENT, DEDENT, NUMBER, OP, STRING
from tokenize import COMMENT, NL
-from six import text_type
-
if False:
# For type annotation
from typing import Any, Dict, IO, List, Tuple # NOQA
@@ -349,7 +347,7 @@ class VariableCommentPicker(ast.NodeVisitor):
targets = get_assign_targets(self.previous)
varnames = get_lvar_names(targets[0], self.get_self())
for varname in varnames:
- if isinstance(node.value.s, text_type):
+ if isinstance(node.value.s, str):
docstring = node.value.s
else:
docstring = node.value.s.decode(self.encoding or 'utf-8')