MCPcopy Create free account
hub / github.com/python-websockets/websockets / __init__

Method __init__

src/websockets/asyncio/async_timeout.py:140–151  ·  view source on GitHub ↗
(
        self, deadline: Optional[float], loop: asyncio.AbstractEventLoop
    )

Source from the content-addressed store, hash-verified

138 __slots__ = ("_deadline", "_loop", "_state", "_timeout_handler", "_task")
139
140 def __init__(
141 self, deadline: Optional[float], loop: asyncio.AbstractEventLoop
142 ) -> None:
143 self._loop = loop
144 self._state = _State.INIT
145
146 self._task: Optional["asyncio.Task[object]"] = None
147 self._timeout_handler = None # type: Optional[asyncio.Handle]
148 if deadline is None:
149 self._deadline = None # type: Optional[float]
150 else:
151 self.update(deadline)
152
153 def __enter__(self) -> "Timeout":
154 warnings.warn(

Callers

nothing calls this directly

Calls 1

updateMethod · 0.95

Tested by

no test coverage detected