summaryrefslogtreecommitdiff
path: root/sphinx/cmd/quickstart.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2018-12-26 01:31:33 +0900
committerGitHub <noreply@github.com>2018-12-26 01:31:33 +0900
commit99a7dca2160996e3189dfcc2176bbbbac531d5f3 (patch)
tree6924a65a62f2191e2f7fe30d3af9ac9da2ca4c48 /sphinx/cmd/quickstart.py
parentf811e4cea696d1dd724f61fb7226b5187b69fac9 (diff)
parent6978918ffc14b0b096285adfa0c90f95de281efa (diff)
downloadsphinx-git-99a7dca2160996e3189dfcc2176bbbbac531d5f3.tar.gz
Merge pull request #5806 from jdufresne/six-text-type
Replace use of six.text_type with str
Diffstat (limited to 'sphinx/cmd/quickstart.py')
-rw-r--r--sphinx/cmd/quickstart.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/sphinx/cmd/quickstart.py b/sphinx/cmd/quickstart.py
index b3db8900e..d3e41aa54 100644
--- a/sphinx/cmd/quickstart.py
+++ b/sphinx/cmd/quickstart.py
@@ -32,7 +32,6 @@ except ImportError:
USE_LIBEDIT = False
from docutils.utils import column_width
-from six import text_type
import sphinx.locale
from sphinx import __display_version__, package_dir
@@ -158,7 +157,7 @@ def term_decode(text):
warnings.warn('term_decode() is deprecated.',
RemovedInSphinx40Warning, stacklevel=2)
- if isinstance(text, text_type):
+ if isinstance(text, str):
return text
# Use the known encoding, if possible
@@ -391,10 +390,9 @@ def generate(d, overwrite=True, silent=False, templatedir=None):
d['project_underline'] = column_width(d['project']) * '='
d.setdefault('extensions', [])
d['copyright'] = time.strftime('%Y') + ', ' + d['author']
- d['author_texescaped'] = text_type(d['author']).\
- translate(texescape.tex_escape_map)
+ d['author_texescaped'] = d['author'].translate(texescape.tex_escape_map)
d['project_doc'] = d['project'] + ' Documentation'
- d['project_doc_texescaped'] = text_type(d['project'] + ' Documentation').\
+ d['project_doc_texescaped'] = (d['project'] + ' Documentation').\
translate(texescape.tex_escape_map)
# escape backslashes and single quotes in strings that are put into