Skip to content

Commit c3a26f7

Browse files
committed
📝 improve type hints and documentation for deprecation parameters
1 parent 37f5a62 commit c3a26f7

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

discord/utils.py

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -294,14 +294,24 @@ def deprecated_message(
294294
295295
Parameters
296296
----------
297-
name
298-
instead
299-
since
300-
removed
301-
reference
297+
name: str
298+
The name of the deprecated function.
299+
instead: Optional[:class:`str`]
300+
A recommended alternative to the function.
301+
since: Optional[:class:`str`]
302+
The version in which the function was deprecated. This should be in the format ``major.minor(.patch)``, where
303+
the patch version is optional.
304+
removed: Optional[:class:`str`]
305+
The version in which the function is planned to be removed. This should be in the format
306+
``major.minor(.patch)``, where the patch version is optional.
307+
reference: Optional[:class:`str`]
308+
A reference that explains the deprecation, typically a URL to a page such as a changelog entry or a GitHub
309+
issue/PR.
302310
303311
Returns
304312
-------
313+
:class:`str`
314+
The deprecation message.
305315
"""
306316
message = f"{name} is deprecated"
307317
if since:

0 commit comments

Comments
 (0)