diff --git a/aiogram/utils/deprecated.py b/aiogram/utils/deprecated.py index 89081c8b..ecb66e6a 100644 --- a/aiogram/utils/deprecated.py +++ b/aiogram/utils/deprecated.py @@ -1,7 +1,3 @@ -""" -Source: https://stackoverflow.com/questions/2536307/decorators-in-the-python-standard-lib-deprecated-specifically -""" - import functools import inspect import warnings @@ -13,6 +9,8 @@ def deprecated(reason): This is a decorator which can be used to mark functions as deprecated. It will result in a warning being emitted when the function is used. + + Source: https://stackoverflow.com/questions/2536307/decorators-in-the-python-standard-lib-deprecated-specifically """ if isinstance(reason, str): diff --git a/docs/source/utils/deprecated.rst b/docs/source/utils/deprecated.rst index ce80bb0e..7f2f07cc 100644 --- a/docs/source/utils/deprecated.rst +++ b/docs/source/utils/deprecated.rst @@ -1,8 +1,5 @@ ========== Deprecated ========== -.. literalinclude:: ../../../aiogram/utils/deprecated.py - :caption: deprecated.py - :language: python3 - :linenos: - +.. automodule:: aiogram.utils.deprecated + :members: