mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
PathLike cleanup (#5242)
Copy builtins._PathLike to os.PathLike Use os.PathLike exclusively outside of builtins
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import sys
|
||||
from builtins import _PathLike # See comment in builtins
|
||||
from os import stat_result as stat_result
|
||||
from os import PathLike, stat_result as stat_result
|
||||
from typing import Dict, List, NamedTuple, Optional, overload
|
||||
|
||||
class uname_result(NamedTuple):
|
||||
@@ -157,7 +156,7 @@ def listdir(path: bytes) -> List[bytes]: ...
|
||||
@overload
|
||||
def listdir(path: int) -> List[str]: ...
|
||||
@overload
|
||||
def listdir(path: _PathLike[str]) -> List[str]: ...
|
||||
def listdir(path: PathLike[str]) -> List[str]: ...
|
||||
|
||||
if sys.platform == "win32":
|
||||
environ: Dict[str, str]
|
||||
|
||||
Reference in New Issue
Block a user