Skip to content

Commit 154c5fa

Browse files
committed
Remove useless type declaration.
1 parent d537c26 commit 154c5fa

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/websockets/protocol.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -226,19 +226,16 @@ def __init__(
226226
# ``self.read_limit``. The ``limit`` argument controls the line length
227227
# limit and half the buffer limit of :class:`~asyncio.StreamReader`.
228228
# That's why it must be set to half of ``self.read_limit``.
229-
self.reader: asyncio.StreamReader = asyncio.StreamReader(
230-
limit=read_limit // 2, loop=loop
231-
)
232-
233-
self.transport: asyncio.Transport
234-
self._drain_lock = asyncio.Lock(
235-
loop=loop if sys.version_info[:2] < (3, 8) else None
236-
)
229+
self.reader = asyncio.StreamReader(limit=read_limit // 2, loop=loop)
237230

238231
# Copied from asyncio.FlowControlMixin
239232
self._paused = False
240233
self._drain_waiter: Optional[asyncio.Future[None]] = None
241234

235+
self._drain_lock = asyncio.Lock(
236+
loop=loop if sys.version_info[:2] < (3, 8) else None
237+
)
238+
242239
# This class implements the data transfer and closing handshake, which
243240
# are shared between the client-side and the server-side.
244241
# Subclasses implement the opening handshake and, on success, execute

0 commit comments

Comments
 (0)