@@ -512,9 +512,23 @@ else:
512
512
followlinks : bool = ...) -> Iterator [Tuple [AnyStr , List [AnyStr ],
513
513
List [AnyStr ]]]: ...
514
514
if sys .version_info >= (3 , 3 ):
515
- def fwalk (top : _PathType = ..., topdown : bool = ...,
516
- onerror : Optional [Callable ] = ..., * , follow_symlinks : bool = ...,
517
- dir_fd : Optional [int ] = ...) -> Iterator [Tuple [str , List [str ], List [str ], int ]]: ... # Unix only
515
+ if sys .version_info >= (3 , 7 ):
516
+ @overload
517
+ def fwalk (top : Union [str , PathLike [str ]] = ..., topdown : bool = ...,
518
+ onerror : Optional [Callable ] = ..., * , follow_symlinks : bool = ...,
519
+ dir_fd : Optional [int ] = ...) -> Iterator [Tuple [str , List [str ], List [str ], int ]]: ... # Unix only
520
+ @overload
521
+ def fwalk (top : bytes , topdown : bool = ...,
522
+ onerror : Optional [Callable ] = ..., * , follow_symlinks : bool = ...,
523
+ dir_fd : Optional [int ] = ...) -> Iterator [Tuple [bytes , List [bytes ], List [bytes ], int ]]: ... # Unix only
524
+ elif sys .version_info >= (3 , 6 ):
525
+ def fwalk (top : Union [str , PathLike [str ]] = ..., topdown : bool = ...,
526
+ onerror : Optional [Callable ] = ..., * , follow_symlinks : bool = ...,
527
+ dir_fd : Optional [int ] = ...) -> Iterator [Tuple [str , List [str ], List [str ], int ]]: ... # Unix only
528
+ else :
529
+ def fwalk (top : str = ..., topdown : bool = ...,
530
+ onerror : Optional [Callable ] = ..., * , follow_symlinks : bool = ...,
531
+ dir_fd : Optional [int ] = ...) -> Iterator [Tuple [str , List [str ], List [str ], int ]]: ... # Unix only
518
532
def getxattr (path : _FdOrPathType , attribute : _PathType , * , follow_symlinks : bool = ...) -> bytes : ... # Linux only
519
533
def listxattr (path : _FdOrPathType , * , follow_symlinks : bool = ...) -> List [str ]: ... # Linux only
520
534
def removexattr (path : _FdOrPathType , attribute : _PathType , * , follow_symlinks : bool = ...) -> None : ... # Linux only
0 commit comments