@@ -372,7 +372,7 @@ async def handle_request(self, scope: Scope, receive: Receive, send: Send) -> No
372372 await error_response (scope , receive , send )
373373 return
374374
375- if self ._terminated : # pragma: no cover
375+ if self ._terminated :
376376 # If the session has been terminated, return 404 Not Found
377377 response = self ._create_error_response (
378378 "Not Found: Session has been terminated" ,
@@ -387,7 +387,7 @@ async def handle_request(self, scope: Scope, receive: Receive, send: Send) -> No
387387 await self ._handle_get_request (request , send )
388388 elif request .method == "DELETE" :
389389 await self ._handle_delete_request (request , send )
390- else : # pragma: no cover
390+ else :
391391 await self ._handle_unsupported_request (request , send )
392392
393393 def _check_accept_headers (self , request : Request ) -> tuple [bool , bool ]:
@@ -991,7 +991,7 @@ async def message_router():
991991 if isinstance (message , JSONRPCResponse | JSONRPCError ) and message .id is not None :
992992 target_request_id = str (message .id )
993993 # Extract related_request_id from meta if it exists
994- elif ( # pragma: no cover
994+ elif (
995995 session_message .metadata is not None
996996 and isinstance (
997997 session_message .metadata ,
@@ -1015,16 +1015,16 @@ async def message_router():
10151015 try :
10161016 # Send both the message and the event ID
10171017 await self ._request_streams [request_stream_id ][0 ].send (EventMessage (message , event_id ))
1018- except (anyio .BrokenResourceError , anyio .ClosedResourceError ): # pragma: no cover
1018+ except (anyio .BrokenResourceError , anyio .ClosedResourceError ):
10191019 # Stream might be closed, remove from registry
10201020 self ._request_streams .pop (request_stream_id , None )
1021- else : # pragma: no cover
1021+ else :
10221022 logger .debug (
10231023 f"""Request stream { request_stream_id } not found
10241024 for message. Still processing message as the client
10251025 might reconnect and replay."""
10261026 )
1027- except anyio .ClosedResourceError : # pragma: no cover
1027+ except anyio .ClosedResourceError :
10281028 if self ._terminated :
10291029 logger .debug ("Read stream closed by client" )
10301030 else :
0 commit comments