struct: fix arg names, mark positional-only args (#3792)

This commit is contained in:
Shantanu
2020-02-29 05:42:04 -08:00
committed by GitHub
parent 0705cd6435
commit b94d23c608
3 changed files with 6 additions and 16 deletions

View File

@@ -20,12 +20,12 @@ else:
def pack(fmt: _FmtType, *v: Any) -> bytes: ...
def pack_into(fmt: _FmtType, buffer: _WriteBufferType, offset: int, *v: Any) -> None: ...
def unpack(fmt: _FmtType, buffer: _BufferType) -> Tuple[Any, ...]: ...
def unpack_from(fmt: _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, ...]: ...
if sys.version_info >= (3, 4):
def iter_unpack(fmt: _FmtType, buffer: _BufferType) -> Iterator[Tuple[Any, ...]]: ...
def iter_unpack(__format: _FmtType, __buffer: _BufferType) -> Iterator[Tuple[Any, ...]]: ...
def calcsize(fmt: _FmtType) -> int: ...
def calcsize(__format: _FmtType) -> int: ...
class Struct:
if sys.version_info >= (3, 7):
@@ -38,7 +38,7 @@ class Struct:
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(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, ...]]: ...

View File

@@ -85,10 +85,6 @@ queue.SimpleQueue.__init__
secrets.SystemRandom.getstate
smtplib.SMTP.sendmail
sre_constants.RANGE_IGNORE
struct.calcsize
struct.iter_unpack
struct.unpack
struct.unpack_from
time.CLOCK_PROF
time.CLOCK_UPTIME
tkinter.Menu.tk_bindForTraversal

View File

@@ -169,12 +169,6 @@ statistics.NormalDist.samples
string.Formatter.format
string.Template.safe_substitute
string.Template.substitute
struct.Struct.iter_unpack
struct.Struct.unpack
struct.calcsize
struct.iter_unpack
struct.unpack
struct.unpack_from
sys.UnraisableHookArgs
threading.ExceptHookArgs
time.CLOCK_PROF