mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
Akuli and srittau: Remove Python 2 branches from Python 3 stubs (#5461)
* run script and do some manual changes (Akuli) * do the whole thing manually (srittau) * merge changes (Akuli) Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
This commit is contained in:
@@ -28,10 +28,7 @@ def select(
|
||||
__rlist: Iterable[Any], __wlist: Iterable[Any], __xlist: Iterable[Any], __timeout: Optional[float] = ...
|
||||
) -> Tuple[List[Any], List[Any], List[Any]]: ...
|
||||
|
||||
if sys.version_info >= (3, 3):
|
||||
error = OSError
|
||||
else:
|
||||
class error(Exception): ...
|
||||
error = OSError
|
||||
|
||||
if sys.platform != "linux" and sys.platform != "win32":
|
||||
# BSD only
|
||||
@@ -103,18 +100,14 @@ if sys.platform != "linux" and sys.platform != "win32":
|
||||
|
||||
if sys.platform == "linux":
|
||||
class epoll(object):
|
||||
if sys.version_info >= (3, 3):
|
||||
def __init__(self, sizehint: int = ..., flags: int = ...) -> None: ...
|
||||
else:
|
||||
def __init__(self, sizehint: int = ...) -> None: ...
|
||||
if sys.version_info >= (3, 4):
|
||||
def __enter__(self) -> epoll: ...
|
||||
def __exit__(
|
||||
self,
|
||||
exc_type: Optional[Type[BaseException]] = ...,
|
||||
exc_val: Optional[BaseException] = ...,
|
||||
exc_tb: Optional[TracebackType] = ...,
|
||||
) -> None: ...
|
||||
def __init__(self, sizehint: int = ..., flags: int = ...) -> None: ...
|
||||
def __enter__(self) -> epoll: ...
|
||||
def __exit__(
|
||||
self,
|
||||
exc_type: Optional[Type[BaseException]] = ...,
|
||||
exc_val: Optional[BaseException] = ...,
|
||||
exc_tb: Optional[TracebackType] = ...,
|
||||
) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
closed: bool
|
||||
def fileno(self) -> int: ...
|
||||
@@ -139,14 +132,12 @@ if sys.platform == "linux":
|
||||
EPOLL_RDHUP: int
|
||||
|
||||
if sys.platform != "linux" and sys.platform != "darwin" and sys.platform != "win32":
|
||||
if sys.version_info >= (3, 3):
|
||||
# Solaris only
|
||||
class devpoll:
|
||||
if sys.version_info >= (3, 4):
|
||||
def close(self) -> None: ...
|
||||
closed: bool
|
||||
def fileno(self) -> int: ...
|
||||
def register(self, fd: FileDescriptorLike, eventmask: int = ...) -> None: ...
|
||||
def modify(self, fd: FileDescriptorLike, eventmask: int = ...) -> None: ...
|
||||
def unregister(self, fd: FileDescriptorLike) -> None: ...
|
||||
def poll(self, timeout: Optional[float] = ...) -> List[Tuple[int, int]]: ...
|
||||
# Solaris only
|
||||
class devpoll:
|
||||
def close(self) -> None: ...
|
||||
closed: bool
|
||||
def fileno(self) -> int: ...
|
||||
def register(self, fd: FileDescriptorLike, eventmask: int = ...) -> None: ...
|
||||
def modify(self, fd: FileDescriptorLike, eventmask: int = ...) -> None: ...
|
||||
def unregister(self, fd: FileDescriptorLike) -> None: ...
|
||||
def poll(self, timeout: Optional[float] = ...) -> List[Tuple[int, int]]: ...
|
||||
|
||||
Reference in New Issue
Block a user