Skip to content

Commit c0c2d9b

Browse files
authored
Allow parallel mode without arguments (#1559)
Allows calling tox with `tox -p` in order to use auto mode. Previously it was mandatory to mention `auto` in order to enable parallel mode. This will not change behavior of tox when called without `-p`, which will still keep the non-parallel mode. Fixes: 1418 Signed-off-by: Sorin Sbarnea <[email protected]>
1 parent 1343f3d commit c0c2d9b

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

docs/changelog/1418.feature.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Allow parallel mode without arguments. - by :user:`ssbarnea`

src/tox/config/parallel.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,11 @@ def add_parallel_flags(parser):
4545
parser.add_argument(
4646
"-p",
4747
"--parallel",
48+
nargs="?",
49+
const="auto",
4850
dest="parallel",
4951
help="run tox environments in parallel, the argument controls limit: all,"
50-
" auto - cpu count, some positive number, zero is turn off",
52+
" auto or missing argument - cpu count, some positive number, 0 to turn off",
5153
action="store",
5254
type=parse_num_processes,
5355
default=DEFAULT_PARALLEL,

0 commit comments

Comments
 (0)