accept and pass args and kwargs in trait constructors
This commit is contained in:
parent
79886a2c64
commit
4c6d906d3a
2 changed files with 4 additions and 3 deletions
|
@ -12,8 +12,8 @@ class CallbacksHolder:
|
||||||
_callbacks : Dict[Any, List[Callable]]
|
_callbacks : Dict[Any, List[Callable]]
|
||||||
_tasks : Dict[uuid.UUID, asyncio.Task]
|
_tasks : Dict[uuid.UUID, asyncio.Task]
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self, *args, **kwargs):
|
||||||
super().__init__()
|
super().__init__(*args, **kwargs)
|
||||||
self._callbacks = {}
|
self._callbacks = {}
|
||||||
self._tasks = {}
|
self._tasks = {}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,8 @@ class Runnable:
|
||||||
_stop_task : Optional[asyncio.Task]
|
_stop_task : Optional[asyncio.Task]
|
||||||
_loop : asyncio.AbstractEventLoop
|
_loop : asyncio.AbstractEventLoop
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self, *args, **kwargs):
|
||||||
|
super().__init__(*args, **kwargs)
|
||||||
self._is_running = False
|
self._is_running = False
|
||||||
self._stop_task = None
|
self._stop_task = None
|
||||||
self._loop = asyncio.get_event_loop()
|
self._loop = asyncio.get_event_loop()
|
||||||
|
|
Loading…
Reference in a new issue