Skip to content

Commit 45c9fdf

Browse files
committed
commit
1 parent ce4b0ed commit 45c9fdf

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Doc/library/argparse.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,17 @@ by setting ``color`` to ``False``::
638638
... help='an integer for the accumulator')
639639
>>> parser.parse_args(['--help'])
640640

641+
Note that the environment variables take precedence over ``color=True``, but
642+
``color=False`` takes precedence over the environment variables. For
643+
instance, if the environment variable ``NO_COLOR`` is set then there will be
644+
no colored output even if the ``color`` parameter is explicitly set to
645+
``True``. If the environment variable ``FORCE_COLOR`` is set then colored
646+
output will be depending on the ``color`` parameter. If both are set then
647+
``NO_COLOR`` takes precedence.
648+
649+
See :ref:`controlling color <using-on-controlling-color>` for more information
650+
on controlling colored output globally.
651+
641652
.. versionadded:: 3.14
642653

643654

0 commit comments

Comments
 (0)