Skip to content

Commit

Permalink
clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
TaiSakuma committed Jul 20, 2022
1 parent a0cb86a commit 927ade3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions nextline/utils/pubsub/broker.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@
class PubSub(Generic[_KT, _VT]):
"""Asynchronous message broker of the publish-subscribe pattern"""

def __init__(self, *args, **kwargs):
self._queue: DefaultDict[_KT, PubSubItem[_VT]] = defaultdict(
PubSubItem
)
def __init__(self):
self._queue: DefaultDict[
_KT,
PubSubItem[_VT],
] = defaultdict(PubSubItem)

def subscribe(
self, key: _KT, last: Optional[bool] = True
Expand Down

0 comments on commit 927ade3

Please sign in to comment.