mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-28 14:46:55 +08:00
Move posix.stat_result to os.stat_result on python 3 (#2683)
In python 3, posix.stat_result is a re-export of os.stat_result, while in python 2 it was the reverse. Update typeshed to reflect this.
This commit is contained in:
committed by
Sebastian Rittau
parent
b9be76c255
commit
95afb86022
@@ -11,6 +11,9 @@ from typing import (
|
||||
)
|
||||
from . import path as path
|
||||
|
||||
# Workaround a pytype crash (see #2683)
|
||||
from builtins import bytes
|
||||
|
||||
_T = TypeVar('_T')
|
||||
|
||||
# ----- os variables -----
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Stubs for os.path
|
||||
# Ron Murawski <ron@horizonchess.com>
|
||||
|
||||
from posix import stat_result
|
||||
import os
|
||||
import sys
|
||||
from typing import (
|
||||
overload, List, Any, AnyStr, Sequence, Tuple, BinaryIO, TextIO,
|
||||
@@ -150,7 +150,7 @@ def relpath(path: _StrPath, start: Optional[_StrPath] = ...) -> Text: ...
|
||||
|
||||
def samefile(path1: _PathType, path2: _PathType) -> bool: ...
|
||||
def sameopenfile(fp1: int, fp2: int) -> bool: ...
|
||||
def samestat(stat1: stat_result, stat2: stat_result) -> bool: ...
|
||||
def samestat(stat1: os.stat_result, stat2: os.stat_result) -> bool: ...
|
||||
|
||||
if sys.version_info >= (3, 6):
|
||||
@overload
|
||||
|
||||
Reference in New Issue
Block a user