Skip to content

Commit

Permalink
python/mypy#1021 workaround fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Crimson-Crow committed Jun 28, 2021
1 parent adfa6a6 commit 2e47c52
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pyobservable.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@
class Observable:
__slots__ = '_event_mapping',

_event_mapping: Dict[Hashable, EventHandlerMapping]

def __new__(cls, *args, **kwargs):
instance = super(Observable, cls).__new__(cls)
event_mapping: Dict[Hashable, EventHandlerMapping] = {}
event_mapping = {}
for c in cls.__mro__:
for event_key in getattr(c, '_events_', []):
if event_key in event_mapping:
Expand Down

0 comments on commit 2e47c52

Please sign in to comment.