Skip to content

Commit d855e38

Browse files
committed
DOC: improve docstrings to class-registry functions
1 parent 81ee9a5 commit d855e38

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

src/diffpy/srreal/_docstrings.py

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,10 @@ class to support pickling and the `createByType` factory.
119119
tp : str
120120
string type identifying a registered @NAME@ class.
121121
122-
Returns a new instance of the @NAME@-derived class.
122+
Returns
123+
-------
124+
@NAME@
125+
A new instance of the @NAME@-derived class named `tp`.
123126
124127
See Also
125128
--------
@@ -129,15 +132,18 @@ class to support pickling and the `createByType` factory.
129132

130133

131134
doc_HasClassRegistry_isRegisteredType = """\
132-
Check if the given string is registered as a @NAME@ type.
135+
Check if the given string is registered as a named @NAME@ type.
133136
134137
Parameters
135138
----------
136139
tp : str
137140
string name or an alias to be checked.
138141
139-
Return ``True`` if `tp` is known to the registry either as
140-
a standard type or its alias.
142+
Returns
143+
-------
144+
bool
145+
``True`` if `tp` is known to the registry either as a standard
146+
type or its alias.
141147
"""
142148

143149

@@ -152,7 +158,12 @@ class to support pickling and the `createByType` factory.
152158

153159

154160
doc_HasClassRegistry_getRegisteredTypes = """\
155-
Return a set of string types of the registered @NAME@ classes.
161+
Get string types of all registered @NAME@ classes.
156162
157163
These are the allowed arguments for the `createByType` factory.
164+
165+
Returns
166+
-------
167+
set
168+
the registered string types.
158169
"""

0 commit comments

Comments
 (0)