module emote.utils.deprecated

Functions

def deprecated(original_function, *reason, max_warn_count, version) -> Callable

Function decorator to deprecate an annotated function. Can be used both as a bare decorator, or with parameters to customize the display of the message. Writes to logging.warn.

Arguments:

  • original_function(Callable): Function to decorate. Automatically passed.
  • reason(str): Message to show. Function name is automatically added.
  • max_warn_count(int): How many times we will warn for the same function
  • version(str)

Returns:

  • the wrapped function