Skip to content

Commit f5008b3

Browse files
authored
fix(sse): remove redundant cast of ServerSentEventMessage.comment to string (#4600)
fix: remove redundant cast of `ServerSentEventMessage.comment` to string
1 parent 7670d49 commit f5008b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

litestar/response/sse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class ServerSentEventMessage:
103103
def encode(self) -> bytes:
104104
buffer = StringIO()
105105
if self.comment is not None:
106-
for chunk in _LINE_BREAK_RE.split(str(self.comment)):
106+
for chunk in _LINE_BREAK_RE.split(self.comment):
107107
buffer.write(f": {chunk}")
108108
buffer.write(self.sep)
109109

0 commit comments

Comments
 (0)