pull priority
out of kwargs
in _hook
This commit is contained in:
parent
27a6078f20
commit
dd8b276b35
1 changed files with 4 additions and 0 deletions
|
@ -90,6 +90,10 @@ class Events(object):
|
|||
self._hook(func, priority, list(kwargs.items()))
|
||||
def _hook(self, func: CALLBACK_TYPE, priority: int = DEFAULT_PRIORITY,
|
||||
kwargs: typing.List[typing.Tuple[str, typing.Any]] = []):
|
||||
for key, value in kwargs:
|
||||
if key == "priority":
|
||||
priority = value
|
||||
break
|
||||
self._root._hook(self._path, func, self._context, priority, kwargs)
|
||||
|
||||
def call(self, **kwargs):
|
||||
|
|
Loading…
Reference in a new issue