Unverified Commit 0ada9fa3 authored by Nicolas Hug's avatar Nicolas Hug Committed by GitHub
Browse files

Indicate strings can be used to specify `weights` parameter (#6314)

* Indicate strings can be used to specify

* quotes
parent 96f5467b
...@@ -326,7 +326,8 @@ def inject_weight_metadata(app, what, name, obj, options, lines): ...@@ -326,7 +326,8 @@ def inject_weight_metadata(app, what, name, obj, options, lines):
lines[:] = [ lines[:] = [
"The model builder above accepts the following values as the ``weights`` parameter.", "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.": if obj.__doc__ != "An enumeration.":
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment