mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-117225: Document colour use in doctest
(#118268)
This commit is contained in:
parent
b52c753e0f
commit
164e2c31c0
2 changed files with 25 additions and 3 deletions
|
@ -632,11 +632,11 @@ behavior can be controlled by setting different environment variables.
|
|||
|
||||
Setting the environment variable ``TERM`` to ``dumb`` will disable color.
|
||||
|
||||
If the environment variable ``FORCE_COLOR`` is set, then color will be
|
||||
If the |FORCE_COLOR|_ environment variable is set, then color will be
|
||||
enabled regardless of the value of TERM. This is useful on CI systems which
|
||||
aren’t terminals but can still display ANSI escape sequences.
|
||||
|
||||
If the environment variable ``NO_COLOR`` is set, Python will disable all color
|
||||
If the |NO_COLOR|_ environment variable is set, Python will disable all color
|
||||
in the output. This takes precedence over ``FORCE_COLOR``.
|
||||
|
||||
All these environment variables are used also by other tools to control color
|
||||
|
@ -645,6 +645,14 @@ output. To control the color output only in the Python interpreter, the
|
|||
precedence over ``NO_COLOR``, which in turn takes precedence over
|
||||
``FORCE_COLOR``.
|
||||
|
||||
.. Apparently this how you hack together a formatted link:
|
||||
|
||||
.. |FORCE_COLOR| replace:: ``FORCE_COLOR``
|
||||
.. _FORCE_COLOR: https://force-color.org/
|
||||
|
||||
.. |NO_COLOR| replace:: ``NO_COLOR``
|
||||
.. _NO_COLOR: https://no-color.org/
|
||||
|
||||
Options you shouldn't use
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue