@@ -95,13 +95,13 @@ async def send_with_gzip(self, message: Message) -> None:
95
95
self .started = True
96
96
body = message .get ("body" , b"" )
97
97
more_body = message .get ("more_body" , False )
98
- if (len (body ) < ( self .minimum_size and not more_body ) ) or any (
98
+ if (( len (body ) < self .minimum_size ) and not more_body ) or any (
99
99
value == b'application/octet-stream'
100
100
for header , value in self .initial_message ["headers" ]
101
101
):
102
102
# Don't apply GZip to small outgoing responses or octet-streams.
103
103
await self .send (self .initial_message )
104
- await self .send (message )
104
+ await self .send (message ) # pylint: disable=unreachable
105
105
elif not more_body :
106
106
# Standard GZip response.
107
107
self .gzip_file .write (body )
@@ -115,7 +115,7 @@ async def send_with_gzip(self, message: Message) -> None:
115
115
message ["body" ] = body
116
116
117
117
await self .send (self .initial_message )
118
- await self .send (message )
118
+ await self .send (message ) # pylint: disable=unreachable
119
119
else :
120
120
# Initial body in streaming GZip response.
121
121
headers = MutableHeaders (raw = self .initial_message ["headers" ])
@@ -129,7 +129,7 @@ async def send_with_gzip(self, message: Message) -> None:
129
129
self .gzip_buffer .truncate ()
130
130
131
131
await self .send (self .initial_message )
132
- await self .send (message )
132
+ await self .send (message ) # pylint: disable=unreachable
133
133
134
134
elif message_type == "http.response.body" :
135
135
# Remaining body in streaming GZip response.
0 commit comments