Add stub for os.path.commonpath (new in 3.5). (#738)

* Add stub for os.path.commonpath (new in 3.5).
This commit is contained in:
George King
2016-12-07 17:47:04 -05:00
committed by Jukka Lehtosalo
parent dccc29bc2f
commit e7db9cda4d

View File

@@ -3,7 +3,8 @@
# based on http://docs.python.org/3.2/library/os.path.html
from typing import overload, List, Any, AnyStr, Tuple, BinaryIO, TextIO
import sys
from typing import overload, List, Any, AnyStr, Sequence, Tuple, BinaryIO, TextIO
# ----- os.path variables -----
supports_unicode_filenames = False
@@ -21,6 +22,9 @@ devnull = ... # type: str
def abspath(path: AnyStr) -> AnyStr: ...
def basename(path: AnyStr) -> AnyStr: ...
if sys.version_info >= (3, 5):
def commonpath(paths: Sequence[AnyStr]) -> AnyStr: ...
# NOTE: Empty List[bytes] results in '' (str) => fall back to Any return type.
def commonprefix(list: List[AnyStr]) -> Any: ...
def dirname(path: AnyStr) -> AnyStr: ...