Skip to content

Commit

Permalink
Indicate strings can be used to specify weights parameter (#6314) (#…
Browse files Browse the repository at this point in the history
…6318)

* Indicate strings can be used to specify

* quotes
  • Loading branch information
NicolasHug committed Jul 27, 2022
1 parent 9b6233d commit 9a40530
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/source/conf.py
Expand Up @@ -326,7 +326,8 @@ def inject_weight_metadata(app, what, name, obj, options, lines):

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

if obj.__doc__ != "An enumeration.":
Expand Down

0 comments on commit 9a40530

Please sign in to comment.