mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-23 19:41:51 +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:
@@ -6,21 +6,14 @@ from typing import Any, Iterator, Text, Tuple, Union
|
||||
class error(Exception): ...
|
||||
|
||||
_FmtType = Union[bytes, Text]
|
||||
if sys.version_info >= (3,):
|
||||
_BufferType = Union[array[int], bytes, bytearray, memoryview, mmap]
|
||||
_WriteBufferType = Union[array[Any], bytearray, memoryview, mmap]
|
||||
else:
|
||||
_BufferType = Union[array[int], bytes, bytearray, buffer, memoryview, mmap]
|
||||
_WriteBufferType = Union[array[Any], bytearray, buffer, memoryview, mmap]
|
||||
_BufferType = Union[array[int], bytes, bytearray, memoryview, mmap]
|
||||
_WriteBufferType = Union[array[Any], bytearray, memoryview, mmap]
|
||||
|
||||
def pack(fmt: _FmtType, *v: Any) -> bytes: ...
|
||||
def pack_into(fmt: _FmtType, buffer: _WriteBufferType, offset: int, *v: Any) -> None: ...
|
||||
def unpack(__format: _FmtType, __buffer: _BufferType) -> Tuple[Any, ...]: ...
|
||||
def unpack_from(__format: _FmtType, buffer: _BufferType, offset: int = ...) -> Tuple[Any, ...]: ...
|
||||
|
||||
if sys.version_info >= (3, 4):
|
||||
def iter_unpack(__format: _FmtType, __buffer: _BufferType) -> Iterator[Tuple[Any, ...]]: ...
|
||||
|
||||
def iter_unpack(__format: _FmtType, __buffer: _BufferType) -> Iterator[Tuple[Any, ...]]: ...
|
||||
def calcsize(__format: _FmtType) -> int: ...
|
||||
|
||||
class Struct:
|
||||
@@ -34,5 +27,4 @@ class Struct:
|
||||
def pack_into(self, buffer: _WriteBufferType, offset: int, *v: Any) -> None: ...
|
||||
def unpack(self, __buffer: _BufferType) -> Tuple[Any, ...]: ...
|
||||
def unpack_from(self, buffer: _BufferType, offset: int = ...) -> Tuple[Any, ...]: ...
|
||||
if sys.version_info >= (3, 4):
|
||||
def iter_unpack(self, __buffer: _BufferType) -> Iterator[Tuple[Any, ...]]: ...
|
||||
def iter_unpack(self, __buffer: _BufferType) -> Iterator[Tuple[Any, ...]]: ...
|
||||
|
||||
Reference in New Issue
Block a user