gaps.config.config_as_str_for_docstring#
- config_as_str_for_docstring(config, config_type=ConfigType.JSON, num_spaces=12)[source]#
Convert a config into a string to be used within a docstring.
In particular, the config is serialized and extra whitespace is added after each newline.
- Parameters:
config (dict) – Dictionary containing the configuration to be converted into docstring format.
config_type (
ConfigType
, optional) – AConfigType
enumeration value specifying what type of config file to generate. By default,ConfigType.JSON
.num_spaces (int, optional) – Number of spaces to add after a newline. By default, 12.
- Returns:
str – A string version of the input config, conforming to the specified config type.