diff --git a/stdlib/2/genericpath.pyi b/stdlib/2/genericpath.pyi deleted file mode 100644 index 24bbbba3b..000000000 --- a/stdlib/2/genericpath.pyi +++ /dev/null @@ -1,12 +0,0 @@ -from typing import AnyStr, List - -class _unicode: ... - -def commonprefix(list: List[AnyStr]) -> AnyStr: ... -def exists(path: unicode) -> bool: ... -def getatime(path: unicode) -> float: ... -def getmtime(path: unicode) -> float: ... -def getctime(path: unicode) -> float: ... -def getsize(path: unicode) -> int: ... -def isfile(path: unicode) -> bool: ... -def isdir(path: unicode) -> bool: ... diff --git a/stdlib/2and3/genericpath.pyi b/stdlib/2and3/genericpath.pyi index a9a72f89a..e0b1c6de2 100644 --- a/stdlib/2and3/genericpath.pyi +++ b/stdlib/2and3/genericpath.pyi @@ -1,14 +1,19 @@ -from typing import List +from typing import Sequence, AnyStr, Text import sys -def exists(path: str) -> bool: ... -def isfile(path: str) -> bool: ... -def isdir(s: str) -> bool: ... -def getsize(filename: str) -> int: ... -def getmtime(filename: str) -> float: ... -def getatime(filename: str) -> float: ... -def getctime(filename: str) -> float: ... -def commonprefix(m: List[str]) -> str: ... +if sys.version_info >= (3, 0): + def commonprefix(m: Sequence[str]) -> str: ... +else: + def commonprefix(m: Sequence[AnyStr]) -> AnyStr: ... + +def exists(path: Text) -> bool: ... +def isfile(path: Text) -> bool: ... +def isdir(s: Text) -> bool: ... +def getsize(filename: Text) -> int: ... +def getmtime(filename: Text) -> float: ... +def getatime(filename: Text) -> float: ... +def getctime(filename: Text) -> float: ... + if sys.version_info >= (3, 4): def samestat(s1: str, s2: str) -> int: ...