diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-12-13 01:33:14 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-12-15 02:42:42 +0900 |
commit | 53917f228f9bfbb4607b6441119baeb129869b93 (patch) | |
tree | 4e87e2e8a2fc209f74a3675dc0f079bda78b6a3b /sphinx/util/docutils.py | |
parent | f8a2e7aa8af27b9d90330d9d795ef20fe0158001 (diff) | |
download | sphinx-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.py | 6 |
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 |