1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Update util.py

whoops warn is not optional
This commit is contained in:
SwissCorePy 2021-06-30 13:11:48 +02:00
parent a6668397e1
commit 073d7fb6a7

View File

@ -420,7 +420,7 @@ def generate_random_token():
return ''.join(random.sample(string.ascii_letters, 16))
def deprecated_dec(warn: Optional[bool]=False, alternative: Optional[Callable]=None):
def deprecated_dec(warn: bool=False, alternative: Optional[Callable]=None):
"""
Use this decorator to mark functions as deprecated.
When the function is used, an info (or warning if `warn` is True) is logged.