Skip to content

Commit 0ada9fa

Browse files
authored
Indicate strings can be used to specify weights parameter (#6314)
* Indicate strings can be used to specify * quotes
1 parent 96f5467 commit 0ada9fa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/source/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,8 @@ def inject_weight_metadata(app, what, name, obj, options, lines):
326326

327327
lines[:] = [
328328
"The model builder above accepts the following values as the ``weights`` parameter.",
329-
f"``{obj.__name__}.DEFAULT`` is equivalent to ``{obj.DEFAULT}``.",
329+
f"``{obj.__name__}.DEFAULT`` is equivalent to ``{obj.DEFAULT}``. You can also use strings, e.g. "
330+
f"``weights='DEFAULT'`` or ``weights='{str(list(obj)[0]).split('.')[1]}'``.",
330331
]
331332

332333
if obj.__doc__ != "An enumeration.":

0 commit comments

Comments
 (0)