Skip to content

Commit 909d6e1

Browse files
authored
fix: show envvars in CLI help (#1085)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
1 parent ea8e1fe commit 909d6e1

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

nox/_options.py

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,10 @@ def _tag_completer(
389389
merge_func=functools.partial(_sessions_merge_func, "sessions"),
390390
nargs="*",
391391
default=default_env_var_list_factory("NOXSESSION"),
392-
help="Which sessions to run. By default, all sessions will run.",
392+
help=(
393+
"Which sessions to run. By default, all sessions will run."
394+
" Environment variable: NOXSESSION"
395+
),
393396
completer=_session_completer,
394397
),
395398
_option_set.Option(
@@ -401,7 +404,10 @@ def _tag_completer(
401404
noxfile=True,
402405
nargs="*",
403406
default=default_env_var_list_factory("NOXPYTHON"),
404-
help="Only run sessions that use the given python interpreter versions.",
407+
help=(
408+
"Only run sessions that use the given python interpreter versions."
409+
" Environment variable: NOXPYTHON"
410+
),
405411
completer=_python_completer,
406412
),
407413
_option_set.Option(
@@ -549,7 +555,7 @@ def _tag_completer(
549555
help=(
550556
"When should nox download python standalone builds to run the sessions,"
551557
" defaults to 'auto' which will download when the version requested can't"
552-
" be found in the running environment."
558+
" be found in the running environment. Environment variable: NOX_DOWNLOAD_PYTHON"
553559
),
554560
choices=["auto", "never", "always"],
555561
),
@@ -560,7 +566,10 @@ def _tag_completer(
560566
group=options.groups["python"],
561567
nargs="*",
562568
default=default_env_var_list_factory("NOXEXTRAPYTHON"),
563-
help="Additionally, run sessions using the given python interpreter versions.",
569+
help=(
570+
"Additionally, run sessions using the given python interpreter versions."
571+
" Environment variable: NOXEXTRAPYTHON"
572+
),
564573
completer=_python_completer,
565574
),
566575
_option_set.Option(
@@ -575,6 +584,7 @@ def _tag_completer(
575584
"Run sessions with the given interpreters instead of those listed in the"
576585
" Noxfile. This is a shorthand for ``--python=X.Y --extra-python=X.Y``."
577586
" It will also work on sessions that don't have any interpreter parametrized."
587+
" Environment variable: NOXFORCEPYTHON"
578588
),
579589
finalizer_func=_force_pythons_finalizer,
580590
completer=_python_completer,
@@ -648,7 +658,7 @@ def _tag_completer(
648658
group=options.groups["reporting"],
649659
default=lambda: "NO_COLOR" in os.environ,
650660
action="store_true",
651-
help="Disable all color output.",
661+
help="Disable all color output. Environment variable: NO_COLOR",
652662
),
653663
_option_set.Option(
654664
"forcecolor",

0 commit comments

Comments
 (0)