mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Allow os.listdir to accept a PathLike in Python3.6 (#1894)
This commit is contained in:
committed by
Jelle Zijlstra
parent
0f36f7ea09
commit
71c2a94cb8
@@ -383,7 +383,16 @@ if sys.version_info >= (3, 3):
|
||||
else:
|
||||
def link(src: _PathType, link_name: _PathType) -> None: ...
|
||||
|
||||
if sys.version_info >= (3, 3):
|
||||
if sys.version_info >= (3, 6):
|
||||
@overload
|
||||
def listdir(path: Optional[str] = ...) -> List[str]: ...
|
||||
@overload
|
||||
def listdir(path: bytes) -> List[bytes]: ...
|
||||
@overload
|
||||
def listdir(path: int) -> List[str]: ...
|
||||
@overload
|
||||
def listdir(path: PathLike[str]) -> List[str]: ...
|
||||
elif sys.version_info >= (3, 3):
|
||||
@overload
|
||||
def listdir(path: Optional[str] = ...) -> List[str]: ...
|
||||
@overload
|
||||
|
||||
Reference in New Issue
Block a user