Skip to content

Commit

Permalink
Merge pull request #4452 from pypa/docs/1648-interpolation
Browse files Browse the repository at this point in the history
Add a section on interpolation.
  • Loading branch information
jaraco authored Jul 1, 2024
2 parents 31c8599 + a9a5400 commit 97e3c8f
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 97e3c8f

Please sign in to comment.