Skip to content

Commit

Permalink
added expicit __init__ to subjects
Browse files Browse the repository at this point in the history
  • Loading branch information
semiversus committed Jun 5, 2018
1 parent 1a12c39 commit 73ffbd3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion broqer/subject.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ class Subject(Publisher, Subscriber):
>>> s.emit(1)
1
"""
def __init__(self):
Publisher.__init__(self)
Subscriber.__init__(self)

emit = Publisher._emit # type: ignore


Expand All @@ -36,7 +40,8 @@ class Value(Publisher, Subscriber):
(1, 2)
"""
def __init__(self, *init):
super().__init__()
Publisher.__init__(self)
Subscriber.__init__(self)
self._cache = init

def subscribe(self, subscriber: Subscriber) -> SubscriptionDisposable:
Expand Down

0 comments on commit 73ffbd3

Please sign in to comment.