summaryrefslogtreecommitdiff
path: root/sphinx/util/docutils.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2018-12-13 01:33:14 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2018-12-15 02:42:42 +0900
commit53917f228f9bfbb4607b6441119baeb129869b93 (patch)
tree4e87e2e8a2fc209f74a3675dc0f079bda78b6a3b /sphinx/util/docutils.py
parentf8a2e7aa8af27b9d90330d9d795ef20fe0158001 (diff)
downloadsphinx-git-53917f228f9bfbb4607b6441119baeb129869b93.tar.gz
Move to py3 mode for mypy (and remove many "type: ignore" comments)
Diffstat (limited to 'sphinx/util/docutils.py')
-rw-r--r--sphinx/util/docutils.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/sphinx/util/docutils.py b/sphinx/util/docutils.py
index aa0b737eb..8dfac4835 100644
--- a/sphinx/util/docutils.py
+++ b/sphinx/util/docutils.py
@@ -166,7 +166,7 @@ def using_user_docutils_conf(confdir):
try:
docutilsconfig = os.environ.get('DOCUTILSCONFIG', None)
if confdir:
- os.environ['DOCUTILSCONFIG'] = path.join(path.abspath(confdir), 'docutils.conf') # type: ignore # NOQA
+ os.environ['DOCUTILSCONFIG'] = path.join(path.abspath(confdir), 'docutils.conf')
yield
finally:
@@ -272,7 +272,7 @@ class WarningStream:
else:
location, type, level = matched.groups()
message = report_re.sub('', text).rstrip()
- logger.log(type, message, location=location) # type: ignore
+ logger.log(type, message, location=location)
class LoggingReporter(Reporter):
@@ -354,7 +354,7 @@ class SphinxFileOutput(FileOutput):
# type: (unicode) -> unicode
if (self.destination_path and self.autoclose and 'b' not in self.mode and
self.overwrite_if_changed and os.path.exists(self.destination_path)):
- with open(self.destination_path, encoding=self.encoding) as f: # type: ignore
+ with open(self.destination_path, encoding=self.encoding) as f:
# skip writing: content not changed
if f.read() == data:
return data