mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-08 17:13:56 +00:00
Fix stacklevel arguments in renamed arguments in the dispatcher
This commit is contained in:
parent
3d4bdcc498
commit
6de53dd476
1 changed files with 3 additions and 3 deletions
|
|
@ -915,7 +915,7 @@ class Dispatcher(DataMixin, ContextInstanceMixin):
|
|||
|
||||
return FSMContext(storage=self.storage, chat=chat, user=user)
|
||||
|
||||
@renamed_argument(old_name='user', new_name='user_id', until_version='3.0', stacklevel=4)
|
||||
@renamed_argument(old_name='user', new_name='user_id', until_version='3.0', stacklevel=3)
|
||||
@renamed_argument(old_name='chat', new_name='chat_id', until_version='3.0', stacklevel=4)
|
||||
async def throttle(self, key, *, rate=None, user_id=None, chat_id=None, no_error=None) -> bool:
|
||||
"""
|
||||
|
|
@ -975,7 +975,7 @@ class Dispatcher(DataMixin, ContextInstanceMixin):
|
|||
return result
|
||||
|
||||
@renamed_argument('user', 'user_id', '3.0')
|
||||
@renamed_argument('chat', 'chat_id', '3.0')
|
||||
@renamed_argument('chat', 'chat_id', '3.0', stacklevel=4)
|
||||
async def check_key(self, key, chat_id=None, user_id=None):
|
||||
"""
|
||||
Get information about key in bucket
|
||||
|
|
@ -997,7 +997,7 @@ class Dispatcher(DataMixin, ContextInstanceMixin):
|
|||
return Throttled(key=key, chat=chat_id, user=user_id, **data)
|
||||
|
||||
@renamed_argument('user', 'user_id', '3.0')
|
||||
@renamed_argument('chat', 'chat_id', '3.0')
|
||||
@renamed_argument('chat', 'chat_id', '3.0', stacklevel=4)
|
||||
async def release_key(self, key, chat_id=None, user_id=None):
|
||||
"""
|
||||
Release blocked key
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue