Skip to content

Commit 888a00b

Browse files
jdsgomesfacebook-github-bot
authored andcommitted
[fbsync] Indicate strings can be used to specify weights parameter (#6314)
Summary: * Indicate strings can be used to specify * quotes Reviewed By: datumbox Differential Revision: D38154567 fbshipit-source-id: 09adba68a83bd4ecd281dae0d2a562974824e0bf
1 parent d058601 commit 888a00b

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)