allow file descriptors in os.stat wrapper functions (#6198)

This commit is contained in:
Akuli
2021-10-25 10:00:27 +00:00
committed by GitHub
parent e38248e818
commit 8454a48c5e
2 changed files with 11 additions and 11 deletions

View File

@@ -14,16 +14,16 @@ def commonprefix(m: Sequence[BytesPath]) -> bytes | Literal[""]: ...
def commonprefix(m: Sequence[list[SupportsLessThanT]]) -> Sequence[SupportsLessThanT]: ...
@overload
def commonprefix(m: Sequence[Tuple[SupportsLessThanT, ...]]) -> Sequence[SupportsLessThanT]: ...
def exists(path: StrOrBytesPath) -> bool: ...
def getsize(filename: StrOrBytesPath) -> int: ...
def isfile(path: StrOrBytesPath) -> bool: ...
def isdir(s: StrOrBytesPath) -> bool: ...
def exists(path: StrOrBytesPath | int) -> bool: ...
def getsize(filename: StrOrBytesPath | int) -> int: ...
def isfile(path: StrOrBytesPath | int) -> bool: ...
def isdir(s: StrOrBytesPath | int) -> bool: ...
# These return float if os.stat_float_times() == True,
# but int is a subclass of float.
def getatime(filename: StrOrBytesPath) -> float: ...
def getmtime(filename: StrOrBytesPath) -> float: ...
def getctime(filename: StrOrBytesPath) -> float: ...
def samefile(f1: StrOrBytesPath, f2: StrOrBytesPath) -> bool: ...
def getatime(filename: StrOrBytesPath | int) -> float: ...
def getmtime(filename: StrOrBytesPath | int) -> float: ...
def getctime(filename: StrOrBytesPath | int) -> float: ...
def samefile(f1: StrOrBytesPath | int, f2: StrOrBytesPath | int) -> bool: ...
def sameopenfile(fp1: int, fp2: int) -> bool: ...
def samestat(s1: os.stat_result, s2: os.stat_result) -> bool: ...

View File

@@ -94,6 +94,6 @@ def splitext(p: PathLike[AnyStr]) -> tuple[AnyStr, AnyStr]: ...
@overload
def splitext(p: AnyStr) -> tuple[AnyStr, AnyStr]: ...
def isabs(s: StrOrBytesPath) -> bool: ...
def islink(path: StrOrBytesPath) -> bool: ...
def ismount(path: StrOrBytesPath) -> bool: ...
def lexists(path: StrOrBytesPath) -> bool: ...
def islink(path: StrOrBytesPath | int) -> bool: ...
def ismount(path: StrOrBytesPath | int) -> bool: ...
def lexists(path: StrOrBytesPath | int) -> bool: ...