EventRoot._hook's kwarg should be a list of tuples

This commit is contained in:
jesopo 2019-09-16 15:34:34 +01:00
parent 6929ff0664
commit a48aececfd

View file

@ -143,7 +143,8 @@ class EventRoot(object):
return DEFAULT_EVENT_DELIMITER.join(path_lower)
def _hook(self, path: typing.List[str], func: CALLBACK_TYPE,
context: typing.Optional[str], priority: int, kwargs: dict
context: typing.Optional[str], priority: int,
kwargs: typing.List[typing.Tuple[str, typing.Any]] = []
) -> EventHook:
path_str = self._path_str(path)
new_hook = EventHook(path_str, func, context, priority, kwargs)