From df6d3c32b3281ef5e0ed8fb93da0de276f2036a7 Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Tue, 26 Jul 2022 11:29:25 +0100 Subject: [PATCH 1/2] Indicate strings can be used to specify --- 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 b3f3f48f3a4..59cc5cfda06 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.": From 78c24dd061d8d2562cec0bae0efd4e3ed7ad4417 Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Tue, 26 Jul 2022 12:11:32 +0100 Subject: [PATCH 2/2] quotes --- docs/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 59cc5cfda06..231d3cad416 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -327,7 +327,7 @@ 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}``. You can also use strings, e.g. " - f"``weights='DEFAULT'`` or ``weights={str(list(obj)[0]).split('.')[1]}``.", + f"``weights='DEFAULT'`` or ``weights='{str(list(obj)[0]).split('.')[1]}'``.", ] if obj.__doc__ != "An enumeration.":