Skip to content

Commit 151f36b

Browse files
committed
[DOC] mkdocs updates to deprecated_alias() in utils
1 parent 9b28991 commit 151f36b

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

janitor/utils.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -256,22 +256,20 @@ def idempotent(func: Callable, df: pd.DataFrame, *args, **kwargs):
256256
def deprecated_alias(**aliases) -> Callable:
257257
"""
258258
Used as a decorator when deprecating old function argument names, while
259-
keeping backwards compatibility.
259+
keeping backwards compatibility. Implementation is inspired from [`StackOverflow`][stack_link].
260260
261-
Implementation is inspired from `StackOverflow`_.
262-
263-
.. _StackOverflow: https://stackoverflow.com/questions/49802412/how-to-implement-deprecation-in-python-with-argument-alias
261+
[stack_link]: https://stackoverflow.com/questions/49802412/how-to-implement-deprecation-in-python-with-argument-alias
264262
265263
Functional usage example:
266264
267-
.. code-block:: python
268-
269-
@deprecated_alias(a='alpha', b='beta')
270-
def simple_sum(alpha, beta):
271-
return alpha + beta
265+
```python
266+
@deprecated_alias(a='alpha', b='beta')
267+
def simple_sum(alpha, beta):
268+
return alpha + beta
269+
```
272270
273271
:param aliases: Dictionary of aliases for a function's arguments.
274-
:return: Your original function wrapped with the kwarg redirection
272+
:return: Your original function wrapped with the `kwarg` redirection
275273
function.
276274
""" # noqa: E501
277275

0 commit comments

Comments
 (0)