mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
Import builtins._PathLike instead of os.PathLike in genericpath. (#4013)
os imports genericpath, so genericpath importing os creates a circular import that confuses pytype.
This commit is contained in:
@@ -6,8 +6,8 @@ if sys.version_info >= (3, 0):
|
||||
else:
|
||||
def commonprefix(m: Sequence[AnyStr]) -> AnyStr: ...
|
||||
if sys.version_info >= (3, 6):
|
||||
from os import PathLike
|
||||
def exists(path: Union[AnyStr, PathLike[AnyStr]]) -> bool: ...
|
||||
from builtins import _PathLike
|
||||
def exists(path: Union[AnyStr, _PathLike[AnyStr]]) -> bool: ...
|
||||
else:
|
||||
def exists(path: Text) -> bool: ...
|
||||
def isfile(path: Text) -> bool: ...
|
||||
|
||||
Reference in New Issue
Block a user