From c84aa878099fbe2431b53935ad838af95689b30f Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Tue, 26 Jul 2022 16:13:52 +0200 Subject: [PATCH] Indicate strings can be used to specify `weights` parameter (#6314) * Indicate strings can be used to specify * quotes --- docs/source/conf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 8768dbdb80c..d10986b51d0 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -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.":