diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-12-16 00:32:10 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-16 00:32:10 +0900 |
commit | c70e65fc6cd04d02df4f7911025f534dbd27cc20 (patch) | |
tree | 1e8614ac5516dace99ef1df4d203081662c7c2d6 /sphinx/testing/path.py | |
parent | d6d4406ce987cc8823d1b3a33be3a418bcd2a59d (diff) | |
parent | 79eec90f36f5a74e24cfd6740126396fd6567e07 (diff) | |
download | sphinx-git-c70e65fc6cd04d02df4f7911025f534dbd27cc20.tar.gz |
Merge branch 'master' into 5770_doctest_refers_highlight_language
Diffstat (limited to 'sphinx/testing/path.py')
-rw-r--r-- | sphinx/testing/path.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/sphinx/testing/path.py b/sphinx/testing/path.py index 438a42d53..77df1ab9b 100644 --- a/sphinx/testing/path.py +++ b/sphinx/testing/path.py @@ -16,7 +16,6 @@ if False: # For type annotation import builtins # NOQA from typing import Any, Callable, IO, List # NOQA - from sphinx.util.typing import unicode # NOQA FILESYSTEMENCODING = sys.getfilesystemencoding() or sys.getdefaultencoding() @@ -36,7 +35,7 @@ class path(text_type): return self.__class__(os.path.dirname(self)) def basename(self): - # type: () -> unicode + # type: () -> str return os.path.basename(self) def abspath(self): @@ -101,7 +100,7 @@ class path(text_type): shutil.rmtree(self, ignore_errors=ignore_errors, onerror=onerror) def copytree(self, destination, symlinks=False): - # type: (unicode, bool) -> None + # type: (str, bool) -> None """ Recursively copy a directory to the given `destination`. If the given `destination` does not exist it will be created. @@ -114,7 +113,7 @@ class path(text_type): shutil.copytree(self, destination, symlinks=symlinks) def movetree(self, destination): - # type: (unicode) -> None + # type: (str) -> None """ Recursively move the file or directory to the given `destination` similar to the Unix "mv" command. @@ -145,11 +144,11 @@ class path(text_type): os.utime(self, arg) def open(self, mode='r', **kwargs): - # type: (unicode, Any) -> IO + # type: (str, Any) -> IO return open(self, mode, **kwargs) def write_text(self, text, encoding='utf-8', **kwargs): - # type: (unicode, unicode, Any) -> None + # type: (str, str, Any) -> None """ Writes the given `text` to the file. """ @@ -159,7 +158,7 @@ class path(text_type): f.write(text) def text(self, encoding='utf-8', **kwargs): - # type: (unicode, Any) -> unicode + # type: (str, Any) -> str """ Returns the text in the file. """ @@ -219,7 +218,7 @@ class path(text_type): return self.__class__(os.path.join(self, *map(self.__class__, args))) def listdir(self): - # type: () -> List[unicode] + # type: () -> List[str] return os.listdir(self) __div__ = __truediv__ = joinpath |