mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-24 03:51:52 +08:00
Use PEP 585 syntax in Python 2, protobuf & _ast stubs, where possible (#6949)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from array import array
|
||||
from mmap import mmap
|
||||
from typing import Any, Text, Tuple, Union
|
||||
from typing import Any, Text, Union
|
||||
|
||||
class error(Exception): ...
|
||||
|
||||
@@ -10,8 +10,8 @@ _WriteBufferType = Union[array[Any], bytearray, buffer, 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, ...]: ...
|
||||
def unpack(__format: _FmtType, __buffer: _BufferType) -> tuple[Any, ...]: ...
|
||||
def unpack_from(__format: _FmtType, buffer: _BufferType, offset: int = ...) -> tuple[Any, ...]: ...
|
||||
def calcsize(__format: _FmtType) -> int: ...
|
||||
|
||||
class Struct:
|
||||
@@ -20,5 +20,5 @@ class Struct:
|
||||
def __init__(self, format: _FmtType) -> None: ...
|
||||
def pack(self, *v: Any) -> bytes: ...
|
||||
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, ...]: ...
|
||||
def unpack(self, __buffer: _BufferType) -> tuple[Any, ...]: ...
|
||||
def unpack_from(self, buffer: _BufferType, offset: int = ...) -> tuple[Any, ...]: ...
|
||||
|
||||
Reference in New Issue
Block a user