Allow infinite waring
Allow infinite waring raising.
from deprecate import deprecated
@deprecated(
target=None, deprecated_in="0.1", remove_in="0.5",
# number or warnings per lifetime (with -1 for always)
num_warns=5
)
def my_sum(a: int, b: int = 5) -> int:
"""My deprecated function which still has to have implementation."""
return a + b
# call this function will raise deprecation warning:
# The `my_sum` was deprecated since v0.1. It will be removed in v0.5.
print(my_sum(1, 2))