@@ -505,7 +505,7 @@ def connection_made(self, transport: BaseTransport) -> None:
505505 The transport argument is the transport representing the write side of the connection.
506506 """
507507 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 )
509509
510510 async def write (self , message : bytes ) -> None :
511511 """Write a message to this connection's transport."""
@@ -563,7 +563,7 @@ def get_buffer(self, sizehint: int) -> memoryview:
563563 return self ._header [self ._header_index :]
564564 if self ._expecting_compression :
565565 return self ._compression_header [self ._compression_index :]
566- return self ._message [self ._message_index :]
566+ return self ._message [self ._message_index :] # type: ignore[index]
567567
568568 def buffer_updated (self , nbytes : int ) -> None :
569569 """Called when the buffer was updated with the received data"""
@@ -641,8 +641,8 @@ def process_header(self) -> tuple[int, int]:
641641 self ._expecting_header = False
642642 return length - 16 , op_code
643643
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."""
646646 op_code , _ , self ._compressor_id = _UNPACK_COMPRESSION_HEADER (self ._compression_header )
647647 self ._expecting_compression = False
648648 return op_code
0 commit comments