forked from LBRYCommunity/lbry-sdk
pylint
This commit is contained in:
parent
777c6342f8
commit
4e85f34353
1 changed files with 2 additions and 2 deletions
|
@ -66,7 +66,7 @@ class StreamController:
|
||||||
next_sub = next_sub._next
|
next_sub = next_sub._next
|
||||||
yield subscription
|
yield subscription
|
||||||
|
|
||||||
def _notify_and_create_task(self, notify):
|
def _notify_and_ensure_future(self, notify):
|
||||||
tasks = []
|
tasks = []
|
||||||
for subscription in self._iterate_subscriptions:
|
for subscription in self._iterate_subscriptions:
|
||||||
maybe_coroutine = notify(subscription)
|
maybe_coroutine = notify(subscription)
|
||||||
|
@ -82,7 +82,7 @@ class StreamController:
|
||||||
def add(self, event):
|
def add(self, event):
|
||||||
skip = self._merge_repeated and event == self._last_event
|
skip = self._merge_repeated and event == self._last_event
|
||||||
self._last_event = event
|
self._last_event = event
|
||||||
return self._notify_and_create_task(
|
return self._notify_and_ensure_future(
|
||||||
lambda subscription: None if skip else subscription._add(event)
|
lambda subscription: None if skip else subscription._add(event)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue