parent
3c45e2217e
commit
402106559e
1 changed files with 13 additions and 4 deletions
|
|
@ -82,9 +82,18 @@ Presets also support inheritance from multiple presets:
|
||||||
- "custom_preset"
|
- "custom_preset"
|
||||||
- "parent_preset"
|
- "parent_preset"
|
||||||
|
|
||||||
In this example, ``child_preset`` will inherit all fields from ``custom_preset``
|
In this example, ``child_preset`` will inherit all fields from ``custom_preset`` and
|
||||||
and ``parent_preset`` in that order. The bottom-most preset has the highest
|
``parent_preset`` in that order. The bottom-most preset has the highest priority. More
|
||||||
priority.
|
specifically, presets are merged using `mergedeep`_ via `a TYPESAFE_ADDITIVE merge`_,
|
||||||
|
which means:
|
||||||
|
|
||||||
|
- if two conflicting keys arent lists or mappings, overwrite the higher priority one
|
||||||
|
- otherwise, combine then re-evaluate
|
||||||
|
|
||||||
If you are only inheriting from one preset, the syntax ``preset: "parent_preset"`` is
|
If you are only inheriting from one preset, the syntax ``preset: "parent_preset"`` is
|
||||||
valid YAML. Inheriting from multiple presets require use of a list.
|
valid YAML. Inheriting from multiple presets require use of a list.
|
||||||
|
|
||||||
|
.. _`mergedeep`:
|
||||||
|
https://mergedeep.readthedocs.io/en/latest/
|
||||||
|
.. _`a TYPESAFE_ADDITIVE merge`:
|
||||||
|
https://mergedeep.readthedocs.io/en/latest/index.html#merge-strategies
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue