Skip to content

Commit 25168fc

Browse files
authored
Merge pull request #2032 from minrk/pylance
define empty zmq.asyncio.Context.__init__ for pyright
2 parents 0204cc4 + 4c73096 commit 25168fc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

zmq/asyncio.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,14 @@ class Context(_zmq.Context[Socket]):
172172
# avoid sharing instance with base Context class
173173
_instance = None
174174

175+
# overload with no changes to satisfy pyright
176+
def __init__(
177+
self: Context,
178+
io_threads: int | _zmq.Context = 1,
179+
shadow: _zmq.Context | int = 0,
180+
) -> None:
181+
super().__init__(io_threads, shadow) # type: ignore
182+
175183

176184
class ZMQEventLoop(SelectorEventLoop):
177185
"""DEPRECATED: AsyncIO eventloop using zmq_poll.

0 commit comments

Comments
 (0)