mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-24 03:51:52 +08:00
committed by
Guido van Rossum
parent
0acdfd1548
commit
54ecefef04
@@ -52,7 +52,10 @@ _VT = TypeVar('_VT')
|
||||
|
||||
|
||||
# namedtuple is special-cased in the type checker; the initializer is ignored.
|
||||
if sys.version_info >= (3, 6):
|
||||
if sys.version_info >= (3, 7):
|
||||
def namedtuple(typename: str, field_names: Union[str, Iterable[str]], *,
|
||||
rename: bool = ..., module: Optional[str] = ...) -> Type[tuple]: ...
|
||||
elif sys.version_info >= (3, 6):
|
||||
def namedtuple(typename: str, field_names: Union[str, Iterable[str]], *,
|
||||
verbose: bool = ..., rename: bool = ..., module: Optional[str] = ...) -> Type[tuple]: ...
|
||||
else:
|
||||
|
||||
@@ -480,10 +480,11 @@ if sys.version_info >= (3, 3):
|
||||
follow_symlinks: bool = ...) -> stat_result: ...
|
||||
else:
|
||||
def stat(path: _PathType) -> stat_result: ...
|
||||
@overload
|
||||
def stat_float_times() -> bool: ...
|
||||
@overload
|
||||
def stat_float_times(__newvalue: bool) -> None: ...
|
||||
if sys.version_info < (3, 7):
|
||||
@overload
|
||||
def stat_float_times() -> bool: ...
|
||||
@overload
|
||||
def stat_float_times(__newvalue: bool) -> None: ...
|
||||
def statvfs(path: _FdOrPathType) -> statvfs_result: ... # Unix only
|
||||
if sys.version_info >= (3, 3):
|
||||
def symlink(source: _PathType, link_name: _PathType,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Ron Murawski <ron@horizonchess.com>
|
||||
|
||||
# based on http://docs.python.org/3.2/library/os.path.html
|
||||
|
||||
import sys
|
||||
from typing import Any, List, Tuple, IO
|
||||
|
||||
# ----- os.path variables -----
|
||||
@@ -43,4 +43,5 @@ def sameopenfile(fp1: IO[Any], fp2: IO[Any]) -> bool: ...
|
||||
def split(path: str) -> Tuple[str, str]: ...
|
||||
def splitdrive(path: str) -> Tuple[str, str]: ...
|
||||
def splitext(path: str) -> Tuple[str, str]: ...
|
||||
# def splitunc(path: str) -> Tuple[str, str] : ... # Windows only, deprecated
|
||||
if sys.version_info < (3, 7) and sys.platform == 'win32':
|
||||
def splitunc(path: str) -> Tuple[str, str]: ...
|
||||
|
||||
Reference in New Issue
Block a user