mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Resolve decorated callbacks in spec filter
This commit is contained in:
parent
e0a832f5ba
commit
42913389c0
1 changed files with 3 additions and 0 deletions
|
|
@ -14,6 +14,9 @@ class CancelHandler(Exception):
|
|||
|
||||
|
||||
def _check_spec(func: callable, kwargs: dict):
|
||||
while hasattr(func, '__wrapped__'): # Try to resolve decorated callbacks
|
||||
func = func.__wrapped__
|
||||
|
||||
spec = inspect.getfullargspec(func)
|
||||
if spec.varkw:
|
||||
return kwargs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue