format_docstring#
- muse.utils.documentation.format_docstring(defaults_name, /, **param_to_field)#
A function decorator that substitutes
{placeholders}in the docstring with the attribute path and import-time value of fields on a defaults object frommuse.variables.- Parameters:
defaults_name (
str) – Name of a defaults object inmuse.variables, e.g."DEFAULTS_MUSE".**param_to_field – Maps each docstring placeholder to a field name (
str) on the defaults object. A typo in either name raisesAttributeErrorat import time.
Notes
The rendered value is the one at import time; the attribute path is included so the live value can always be looked up.