Skip to content

Commit

Permalink
fix classes (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrmaslanka committed Mar 10, 2020
1 parent 9f3baff commit a52ed9d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions satella/coding/concurrent/monitor.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import collections
import logging
import threading
import typing as tp

from ..decorators import wraps

__all__ = [
'Monitor', 'RMonitor', 'MonitorDict', 'MonitorList'
]

K, V, T = tp.TypeVar('K'), tp.TypeVar('V'), tp.TypeVar('T')
logger = logging.getLogger(__name__)


Expand Down Expand Up @@ -144,14 +142,14 @@ def __init__(self):
self._monitor_lock = threading.RLock()


class MonitorList(collections.UserList[T], Monitor):
class MonitorList(collections.UserList, Monitor):
"""A list that is also a monitor"""
def __init__(self, *args):
super().__init__(*args)
Monitor.__init__(self)


class MonitorDict(collections.UserDict[K, V], Monitor):
class MonitorDict(collections.UserDict, Monitor):
"""A dict that is also a monitor"""
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
Expand Down

0 comments on commit a52ed9d

Please sign in to comment.