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/osutil.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/osutil.py')
-rw-r--r-- | sphinx/util/osutil.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sphinx/util/osutil.py b/sphinx/util/osutil.py index f2ac4032f..7044cead3 100644 --- a/sphinx/util/osutil.py +++ b/sphinx/util/osutil.py @@ -83,7 +83,7 @@ def relative_uri(base, to): def ensuredir(path): # type: (unicode) -> None """Ensure that a path exists.""" - os.makedirs(path, exist_ok=True) # type: ignore + os.makedirs(path, exist_ok=True) def walk(top, topdown=True, followlinks=False): @@ -169,9 +169,9 @@ def ustrftime(format, *args): # On Windows, time.strftime() and Unicode characters will raise UnicodeEncodeError. # https://bugs.python.org/issue8304 try: - return time.strftime(format, *args) # type: ignore + return time.strftime(format, *args) except UnicodeEncodeError: - r = time.strftime(format.encode('unicode-escape').decode(), *args) # type: ignore + r = time.strftime(format.encode('unicode-escape').decode(), *args) return r.encode().decode('unicode-escape') @@ -200,7 +200,7 @@ def abspath(pathdir): try: pathdir = pathdir.decode(fs_encoding) except UnicodeDecodeError: - raise UnicodeDecodeError('multibyte filename not supported on ' # type: ignore + raise UnicodeDecodeError('multibyte filename not supported on ' 'this filesystem encoding ' '(%r)' % fs_encoding) return pathdir |