Skip to content

Commit

Permalink
docs(config-file): add note about whitespace-delimited dictionary inp…
Browse files Browse the repository at this point in the history
…ut in YAML
  • Loading branch information
aleaf committed Aug 6, 2024
1 parent f01a9e5 commit 61f90d6
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/source/config-file.rst
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,25 @@ Some additional notes on YAML
* ``[12,1.2]`` parses to ``[12,1.2]``
* ``(12,1.2)`` parses to ``"(12,1.2)"``
* ``{12,1.2}`` parses to ``{12: None, 1.2: None}``
* dictionaries can be represented with indentation, but spaces are needed after the colon(s):

.. code-block:: yaml
items:
0:1
1:2
parses to ``'0:1 1:2'``

.. code-block:: yaml
items:
0: 1
1: 2
parses to ``{0:1, 1:2}``

Using a YAML-aware text editor such as VS Code can help with these issues, for example by changing the highlighting color to indicate a string in the first dictionary example above and an interpreted python data structure in the second dictionary example.

.. _JSON: https://www.json.org/json-en.html
.. _pyyaml: https://pyyaml.org/
Expand Down

0 comments on commit 61f90d6

Please sign in to comment.