def on_toml_dumps(self, toml, config, dictionary, **kwargs):
inline_tables = set(kwargs.get("<STR_LIT>", []))<EOL>def _dump_dict(dictionary, source, source_path=[]):<EOL><INDENT>for (key, value) in dictionary.items():<EOL><INDENT>if isinstance(value, dict):<EOL><INDENT>is_inline = any(<EOL>[<EOL>fnmatch.fnmatch("<STR_LIT:.>".join(source_path + [key]), pattern)<EOL>for pattern in inline_tables<EOL>]<EOL>)<EOL>if is_inline:<EOL><INDENT>source[key] = toml.TomlDecoder().get_empty_inline_table()<EOL><DEDENT>else:<EOL><INDENT>source[key] = {}<EOL><DEDENT>source[key].update(<EOL>_dump_dict(value, {}, source_path=source_path + [key])<EOL>)<EOL><DEDENT>else:<EOL><INDENT>source[key] = value<EOL><DEDENT><DEDENT>return source<EOL><DEDENT>encoder = toml.TomlEncoder(preserve=True)<EOL>return toml.dumps(_dump_dict(dictionary, {}), encoder=encoder)<EOL>
The `toml <https://pypi.org/project/toml/>`_ dumps method.

        :param module toml: The ``toml`` module
        :param class config: The instance's config class
        :param dict dictionary: The dictionary to serialize
        :param list inline_tables: A list glob patterns to use for derminining which
            dictionaries should be rendered as inline tables, defaults to [], optional
        :returns: The TOML serialization
        :rtype: str

        Dumping inline tables uses :mod:`fnmatch` to compare ``.`` delimited dictionary
        path glob patterns to filter tables

        >>> config.dumps_toml(prefer="toml")
        name = "My Project"
        type = "personal-project"
        keywords = [ "example", "test",]
        [dependencies.a-dependency]
        name = "A Dependency"
        version = "v12"
        >>> config.dumps_toml(prefer="toml", inline_tables=["dependencies"])
        name = "My Project"
        type = "personal-project"
        keywords = [ "example", "test",]
        dependencies = {a-dependency = {name = "A Dependency",version = "v12"}
        }
        >>> config.dumps_toml(prefer="toml", inline_tables=["dependencies.*"])
        name = "My Project"
        type = "personal-project"
        keywords = [ "example", "test",]
        [dependencies]
        a-dependency = { name = "A Dependency", version = "v12" }