summaryrefslogtreecommitdiff
path: root/sphinx/setup_command.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2018-12-15 03:14:11 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2018-12-15 23:57:43 +0900
commit6bc357140dbb074eb0d590c1226009f83f97862e (patch)
treea7c8d2087ee1f50dadb5ca78343ac10c6959b740 /sphinx/setup_command.py
parent0031c9b4822ae9684888ae90bc70d6ceb3313581 (diff)
downloadsphinx-git-6bc357140dbb074eb0d590c1226009f83f97862e.tar.gz
Replace all "unicode" type by "str"
Diffstat (limited to 'sphinx/setup_command.py')
-rw-r--r--sphinx/setup_command.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/sphinx/setup_command.py b/sphinx/setup_command.py
index f46553403..dfe251d18 100644
--- a/sphinx/setup_command.py
+++ b/sphinx/setup_command.py
@@ -27,7 +27,6 @@ from sphinx.util.osutil import abspath
if False:
# For type annotation
from typing import Any, Dict, List, Tuple # NOQA
- from sphinx.util.typing import unicode # NOQA
class BuildDoc(Command):
@@ -95,14 +94,14 @@ class BuildDoc(Command):
# type: () -> None
self.fresh_env = self.all_files = False
self.pdb = False
- self.source_dir = self.build_dir = None # type: unicode
+ self.source_dir = self.build_dir = None # type: str
self.builder = 'html'
self.warning_is_error = False
self.project = ''
self.version = ''
self.release = ''
self.today = ''
- self.config_dir = None # type: unicode
+ self.config_dir = None # type: str
self.link_index = False
self.copyright = ''
self.verbosity = 0
@@ -110,7 +109,7 @@ class BuildDoc(Command):
self.nitpicky = False
def _guess_source_dir(self):
- # type: () -> unicode
+ # type: () -> str
for guess in ('doc', 'docs'):
if not os.path.isdir(guess):
continue
@@ -123,7 +122,7 @@ class BuildDoc(Command):
# unicode, causing finalize_options to fail if invoked again. Workaround
# for https://bugs.python.org/issue19570
def _ensure_stringlike(self, option, what, default=None):
- # type: (unicode, unicode, Any) -> Any
+ # type: (str, str, Any) -> Any
val = getattr(self, option)
if val is None:
setattr(self, option, default)
@@ -154,7 +153,7 @@ class BuildDoc(Command):
self.builder_target_dirs = [
(builder, os.path.join(self.build_dir, builder))
- for builder in self.builder] # type: List[Tuple[str, unicode]]
+ for builder in self.builder]
def run(self):
# type: () -> None
@@ -164,7 +163,7 @@ class BuildDoc(Command):
status_stream = StringIO()
else:
status_stream = sys.stdout # type: ignore
- confoverrides = {} # type: Dict[unicode, Any]
+ confoverrides = {} # type: Dict[str, Any]
if self.project:
confoverrides['project'] = self.project
if self.version: