@@ -505,7 +505,7 @@ def connection_made(self, transport: BaseTransport) -> None:
505
505
The transport argument is the transport representing the write side of the connection.
506
506
"""
507
507
self .transport = transport # type: ignore[assignment]
508
- self .transport .set_write_buffer_limits (MAX_MESSAGE_SIZE , MAX_MESSAGE_SIZE ) # type: ignore
508
+ self .transport .set_write_buffer_limits (MAX_MESSAGE_SIZE , MAX_MESSAGE_SIZE )
509
509
510
510
async def write (self , message : bytes ) -> None :
511
511
"""Write a message to this connection's transport."""
@@ -563,7 +563,7 @@ def get_buffer(self, sizehint: int) -> memoryview:
563
563
return self ._header [self ._header_index :]
564
564
if self ._expecting_compression :
565
565
return self ._compression_header [self ._compression_index :]
566
- return self ._message [self ._message_index :]
566
+ return self ._message [self ._message_index :] # type: ignore[index]
567
567
568
568
def buffer_updated (self , nbytes : int ) -> None :
569
569
"""Called when the buffer was updated with the received data"""
@@ -641,8 +641,8 @@ def process_header(self) -> tuple[int, int]:
641
641
self ._expecting_header = False
642
642
return length - 16 , op_code
643
643
644
- def process_compression_header (self ) -> tuple [ int , int ] :
645
- """Unpack a MongoDB Wire Protocol header."""
644
+ def process_compression_header (self ) -> int :
645
+ """Unpack a MongoDB Wire Protocol compression header."""
646
646
op_code , _ , self ._compressor_id = _UNPACK_COMPRESSION_HEADER (self ._compression_header )
647
647
self ._expecting_compression = False
648
648
return op_code
0 commit comments