Skip to content

Commit

Permalink
simplify logic
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyCBakerPhD committed Apr 10, 2024
1 parent 91857a3 commit 81e34ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tqdm_publisher/_demos/_parallel_bars/_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def format_server_sent_events(*, message_data: str, event_type: str = "message")
formatted_message : str
The formatted message to be sent to the client.
"""
message = f"event: {event_type}\n" if event_type is not None else ""
message = f"event: {event_type}\n" if event_type != "" else ""
message += f"data: {message_data}\n\n"
return message

Expand Down

0 comments on commit 81e34ad

Please sign in to comment.