Skip to content

Commit 2bbbdca

Browse files
committed
fix: string format
1 parent 58bfa07 commit 2bbbdca

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

aiohttp/http_websocket.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -356,9 +356,12 @@ def _feed_data(self, data: bytes) -> Tuple[bool, bytes]:
356356
left = len(self._decompressobj.unconsumed_tail)
357357
raise WebSocketError(
358358
WSCloseCode.MESSAGE_TOO_BIG,
359-
"Decompressed message size exceeds limit {}".
360-
format(self._max_msg_size + left,
361-
self._max_msg_size))
359+
"Decompressed message size {} exceeds limit {}"
360+
.format(
361+
self._max_msg_size + left,
362+
self._max_msg_size
363+
)
364+
)
362365
else:
363366
payload_merged = bytes(self._partial)
364367

aiohttp/payload.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def __init__(self,
207207
*args: Any,
208208
**kwargs: Any) -> None:
209209
if not isinstance(value, (bytes, bytearray, memoryview)):
210-
raise TypeError("value argument must be byte-ish, not (!r)"
210+
raise TypeError("value argument must be byte-ish, not {!r}"
211211
.format(type(value)))
212212

213213
if 'content_type' not in kwargs:

0 commit comments

Comments
 (0)