Skip to content

Commit

Permalink
Add a section on interpolation.
Browse files Browse the repository at this point in the history
Closes #1648
  • Loading branch information
jaraco committed Jul 1, 2024
1 parent 31c8599 commit a9a5400
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions docs/userguide/declarative_config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,24 @@ value associated with ``""`` in the ``package_dir`` dictionary.
Please see :doc:`package discovery </userguide/package_discovery>` for more
details.

Interpolation
=============

Config files are parsed using :mod:`configparser` with
`interpolation <https://docs.python.org/3/library/configparser.html#interpolation-of-values>`_
enabled. As a result, one config value may reference another. This
feature may be used, for example, in defining extras:

.. code-block:: ini
[options.extras_require]
tester =
pytest==3.3.2
pytest-sugar
dev =
pytest-xdist
%(tester)s
Specifying values
=================

Expand Down

0 comments on commit a9a5400

Please sign in to comment.