2024-08-13 17:06:12 +00:00
|
|
|
"""Add additional command line arguments to tox to configure plugin behavior"""
|
2024-08-16 18:27:46 +00:00
|
|
|
|
2024-08-13 17:06:12 +00:00
|
|
|
from tox.config.cli.parser import ToxParser
|
|
|
|
from tox.plugin import impl
|
|
|
|
|
|
|
|
from tox_poetry_installer import constants
|
|
|
|
|
|
|
|
|
2024-08-15 18:41:34 +00:00
|
|
|
# pylint: disable=missing-function-docstring
|
2024-08-13 17:06:12 +00:00
|
|
|
@impl
|
|
|
|
def tox_add_option(parser: ToxParser):
|
|
|
|
parser.add_argument(
|
|
|
|
"--parallel-install-threads",
|
|
|
|
type=int,
|
|
|
|
dest="parallel_install_threads",
|
|
|
|
default=constants.DEFAULT_INSTALL_THREADS,
|
|
|
|
help="Number of locked dependencies to install simultaneously; set to 0 to disable parallel installation",
|
|
|
|
)
|