X-Git-Url: https://wannabe.guru.org/gitweb/?a=blobdiff_plain;f=src%2Fpyutils%2Fdecorator_utils.py;h=30b1bfb6f756324981563e6d7345dd81d2e25cde;hb=84f53cd94d18a8d239216704a6a33c7dbf2fc6b9;hp=e8d2249c2b1c785b51ec5e3a02e3417f09e12a89;hpb=69566c003b4f1c3a4905f37d3735d7921502d14a;p=pyutils.git diff --git a/src/pyutils/decorator_utils.py b/src/pyutils/decorator_utils.py index e8d2249..30b1bfb 100644 --- a/src/pyutils/decorator_utils.py +++ b/src/pyutils/decorator_utils.py @@ -488,6 +488,11 @@ def deprecated(func): """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. + + >>> @deprecated + ... def foo() -> None: + ... pass + >>> foo() # prints + logs "Call to deprecated function foo" """ @functools.wraps(func)