snippet_fmt.config¶
Read and parse snippet-fmt configuration.
Classes:
|
Functions:
|
Load the |
-
typeddict
SnippetFmtConfigDict[source]¶ Bases:
TypedDicttyping.TypedDictrepresenting the configuration mapping parsed fromformate.tomlor similar.- Required Keys
languages (
Dict[str,Dict[str,Any]]) – The languages to reformat. The keys correspond to the value after.. code-block::, including matching case. The values arekey: valuemappings giving language-specific options. The exact options vary, but each has areformatoption which defaults toFalse. If set toTruethe code snippets in that language will be reformatted, otherwise they will only be syntax checked. For example, the following code block has a value of'TOML': .. code-block:: rst .. code-block:: TOML key = “value” Different capitalisation (e.g.JSONvsjson) can be used to apply different settings to different groups of code blocks. For example,JSONcode blocks could have and indent of 2, butjsonblocks have no indentation.directives (
List[str]) – The directive types to reformat, such as'code-block'for.. code-block::. The values are case sensitive.