mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
create_datagram_endpoint expects a str when family=AF_UNIX (#9574)
Since python 3.7, asyncio.loop.create_datagram_endpoint expects the arguments `local_addr` and `remote_addr` to be `str` or `None` when the argument family=`socket.AF_UNIX` and the argument `sock` is `None` or also a unix socket.
This commit is contained in:
@@ -342,8 +342,8 @@ class BaseEventLoop(AbstractEventLoop):
|
||||
async def create_datagram_endpoint( # type: ignore[override]
|
||||
self,
|
||||
protocol_factory: Callable[[], _ProtocolT],
|
||||
local_addr: tuple[str, int] | None = None,
|
||||
remote_addr: tuple[str, int] | None = None,
|
||||
local_addr: tuple[str, int] | str | None = None,
|
||||
remote_addr: tuple[str, int] | str | None = None,
|
||||
*,
|
||||
family: int = 0,
|
||||
proto: int = 0,
|
||||
@@ -356,8 +356,8 @@ class BaseEventLoop(AbstractEventLoop):
|
||||
async def create_datagram_endpoint(
|
||||
self,
|
||||
protocol_factory: Callable[[], _ProtocolT],
|
||||
local_addr: tuple[str, int] | None = ...,
|
||||
remote_addr: tuple[str, int] | None = ...,
|
||||
local_addr: tuple[str, int] | str | None = ...,
|
||||
remote_addr: tuple[str, int] | str | None = ...,
|
||||
*,
|
||||
family: int = ...,
|
||||
proto: int = ...,
|
||||
|
||||
@@ -495,8 +495,8 @@ class AbstractEventLoop:
|
||||
async def create_datagram_endpoint(
|
||||
self,
|
||||
protocol_factory: Callable[[], _ProtocolT],
|
||||
local_addr: tuple[str, int] | None = None,
|
||||
remote_addr: tuple[str, int] | None = None,
|
||||
local_addr: tuple[str, int] | str | None = None,
|
||||
remote_addr: tuple[str, int] | str | None = None,
|
||||
*,
|
||||
family: int = 0,
|
||||
proto: int = 0,
|
||||
|
||||
Reference in New Issue
Block a user