mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-09 23:10:24 +01:00
The code are wrapped due to us using line-length=79 before, but now some of the code can easily fit in 88 chars. The formatter did not change this automatically when we changed line-length, because of magic trailing commas that gets added when they turn into multiple lines. Black/ruff wrapping them in parens and splitting them into multiple lines was making it difficult to read.
27 lines
813 B
Python
27 lines
813 B
Python
from dvc.cli import formatter
|
|
from dvc.cli.utils import append_doc_link
|
|
from dvc.commands.queue import kill, logs, remove, start, status, stop
|
|
|
|
SUB_COMMANDS = [start, stop, status, logs, remove, kill]
|
|
|
|
|
|
def add_parser(subparsers, parent_parser):
|
|
QUEUE_HELP = "Commands to manage experiments queue."
|
|
|
|
queue_parser = subparsers.add_parser(
|
|
"queue",
|
|
parents=[parent_parser],
|
|
description=append_doc_link(QUEUE_HELP, "queue"),
|
|
formatter_class=formatter.RawDescriptionHelpFormatter,
|
|
help=QUEUE_HELP,
|
|
)
|
|
|
|
queue_subparsers = queue_parser.add_subparsers(
|
|
dest="cmd",
|
|
help="Use `dvc queue CMD --help` to display command-specific help.",
|
|
required=True,
|
|
)
|
|
|
|
for cmd in SUB_COMMANDS:
|
|
cmd.add_parser(queue_subparsers, parent_parser)
|