Skip to content

Commit

Permalink
fixed lint and Value
Browse files Browse the repository at this point in the history
  • Loading branch information
semiversus committed Jun 1, 2021
1 parent c545085 commit 993b340
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion broqer/operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ def originator(self, publisher: Publisher):
if self._subscriptions:
self._originator.subscribe(self)


def __ror__(self, publisher: Publisher) -> Publisher:
if self._originator is not None:
raise TypeError('operator already applied')
Expand Down
7 changes: 3 additions & 4 deletions broqer/value.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from typing import Any

# pylint: disable=cyclic-import
from broqer import Publisher, Subscriber, NONE
from broqer import Publisher, NONE
from broqer.operator import Operator


Expand All @@ -20,9 +20,8 @@ class Value(Operator):
1
"""
def __init__(self, init=NONE):
Publisher.__init__(self, init)
Subscriber.__init__(self)
self._originator = None # type: typing.Optional[Publisher]
Operator.__init__(self)
self._state = init

def emit(self, value: Any,
who: Publisher = None) -> None: # pylint: disable=unused-argument
Expand Down

0 comments on commit 993b340

Please sign in to comment.