mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Added some missing types from various stdlib stubs (#4466)
This commit is contained in:
@@ -15,7 +15,7 @@ CPython C source: https://github.com/python/cpython/blob/master/Modules/socketmo
|
||||
# Ron Murawski <ron@horizonchess.com>
|
||||
# adapted for Python 2.7 by Michal Pokorny
|
||||
import sys
|
||||
from typing import Any, BinaryIO, Iterable, List, Optional, Text, TextIO, Tuple, TypeVar, Union, overload
|
||||
from typing import Any, BinaryIO, Iterable, List, Optional, Sequence, Text, TextIO, Tuple, TypeVar, Union, overload
|
||||
from typing_extensions import Literal
|
||||
|
||||
# ----- Constants -----
|
||||
@@ -713,11 +713,11 @@ class socket:
|
||||
self, __buffers: Iterable[bytes], __ancdata: Iterable[_CMSG] = ..., __flags: int = ..., __address: _Address = ...
|
||||
) -> int: ...
|
||||
if sys.platform == "linux" and sys.version_info >= (3, 6):
|
||||
# TODO add the parameter types for sendmsg_afalg
|
||||
def sendmsg_afalg(self, msg=..., *, op, iv=..., assoclen=..., flags=...) -> int: ...
|
||||
def sendmsg_afalg(
|
||||
self, msg: Iterable[bytes] = ..., *, op: int, iv: Any = ..., assoclen: int = ..., flags: int = ...
|
||||
) -> int: ...
|
||||
if sys.version_info >= (3,):
|
||||
# TODO determine legal types for file parameter
|
||||
def sendfile(self, file, offset: int = ..., count: Optional[int] = ...) -> int: ...
|
||||
def sendfile(self, file: BinaryIO, offset: int = ..., count: Optional[int] = ...) -> int: ...
|
||||
def set_inheritable(self, inheritable: bool) -> None: ...
|
||||
def setblocking(self, flag: bool) -> None: ...
|
||||
def settimeout(self, value: Optional[float]) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user