Skip to content

Commit 0b647f6

Browse files
[PR #9816/26f096d8 backport][3.11] Avoid duplicate bool cast in should_close (#9819)
Co-authored-by: J. Nick Koston <[email protected]>
1 parent a6767a0 commit 0b647f6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

aiohttp/client_proto.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ def upgraded(self) -> bool:
5050

5151
@property
5252
def should_close(self) -> bool:
53-
return (
53+
return bool(
5454
self._should_close
5555
or (self._payload is not None and not self._payload.is_eof())
5656
or self._upgraded
5757
or self._exception is not None
5858
or self._payload_parser is not None
59-
or bool(self._buffer)
60-
or bool(self._tail)
59+
or self._buffer
60+
or self._tail
6161
)
6262

6363
def close(self) -> None:

0 commit comments

Comments
 (0)