snippet_fmt.config
¶
Read and parse snippet-fmt
configuration.
Classes:
|
Functions:
|
Load the |
-
typeddict
SnippetFmtConfigDict
[source]¶ Bases:
TypedDict
typing.TypedDict
representing the configuration mapping parsed fromformate.toml
or 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: value
mappings giving language-specific options. The exact options vary, but each has areformat
option which defaults toFalse
. If set toTrue
the 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.JSON
vsjson
) can be used to apply different settings to different groups of code blocks. For example,JSON
code blocks could have and indent of 2, butjson
blocks have no indentation.directives (
List
[str
]) – The directive types to reformat, such as'code-block'
for.. code-block::
. The values are case sensitive.