Skip to content

Commit

Permalink
docs: refformated with black
Browse files Browse the repository at this point in the history
docs: refformated with black
  • Loading branch information
caiquilipe committed Feb 27, 2024
1 parent 07b6c89 commit 973055d
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions broadcaster/_backends/redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@ def __init__(self, url: str):
self._port = parsed_url.port or 6379
self._password = parsed_url.password or None
self._ssl = parsed_url.scheme == "rediss"
self.kwargs = {"host": self._host, "port": self._port, "password": self._password, "ssl": self._ssl}

self.kwargs = {
"host": self._host,
"port": self._port,
"password": self._password,
"ssl": self._ssl,
}

self._sub_conn: PubSub | None = None
self._pub_conn: PubSub | None = None

Expand All @@ -40,7 +45,9 @@ async def publish(self, channel: str, message: Any) -> None:
async def next_published(self) -> Event:
message = None
while not message:
message = await self._sub_conn.get_message(ignore_subscribe_messages=True, timeout=None)
message = await self._sub_conn.get_message(
ignore_subscribe_messages=True, timeout=None
)
event = Event(
channel=message["channel"].decode(),
message=message["data"].decode(),
Expand Down

0 comments on commit 973055d

Please sign in to comment.