Skip to content

Commit 2062ed6

Browse files
committed
should probably document this
1 parent f025623 commit 2062ed6

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tdl/__style.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
1+
"""
2+
Used internally to handle style changes without breaking backwards
3+
compatibility.
4+
"""
15

26
import warnings as _warnings
37
import functools as _functools
48

59
def backport(func):
10+
"""
11+
Backport a function name into an old style for compatibility.
12+
13+
The docstring is updated to reflect that the new function returned is
14+
deprecated and that the other function is preferred.
15+
A DeprecationWarning is also raised for using this function.
16+
"""
617
@_functools.wraps(func)
718
def deprecated_function(*args, **kargs):
819
_warnings.warn('This finction name is deprecated',

0 commit comments

Comments
 (0)