Skip to content

Commit 77db094

Browse files
committed
reorder items in docstring for proper rendering
1 parent 2a79ecf commit 77db094

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/diffpy/utils/_deprecator.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -142,15 +142,6 @@ def generate_deprecation_docstring(new_name, removal_version, new_base=None):
142142
143143
This function will print the text to the terminal for copy-pasting.
144144
145-
Usage
146-
-----
147-
>>> from diffpy.utils._deprecator import generate_deprecation_docstring
148-
>>> generate_deprecation_docstring("new_name", "4.0.0")
149-
150-
The message looks like:
151-
This function has been deprecated and will be removed in version
152-
{removal_version}. Please use {new_base}.{new_name} instead.
153-
154145
Parameters
155146
----------
156147
new_name : str
@@ -162,6 +153,16 @@ def generate_deprecation_docstring(new_name, removal_version, new_base=None):
162153
The new base for importing. The new import statement would look like
163154
"from new_base import new_name". Defaults to None.
164155
156+
Example
157+
-------
158+
>>> from diffpy.utils._deprecator import generate_deprecation_docstring
159+
>>> generate_deprecation_docstring("new_name", "4.0.0")
160+
161+
The message looks like:
162+
This function has been deprecated and will be removed in version
163+
{removal_version}. Please use {new_base}.{new_name} instead.
164+
165+
165166
Returns
166167
-------
167168
None

0 commit comments

Comments
 (0)