mirror of
https://github.com/daylinmorgan/viv.git
synced 2024-11-14 04:57:53 -06:00
fix: use docstrings for subcommands
This commit is contained in:
parent
4ee497f2f7
commit
93d406b424
1 changed files with 5 additions and 3 deletions
|
@ -55,7 +55,7 @@ from typing import (
|
||||||
from urllib.error import HTTPError
|
from urllib.error import HTTPError
|
||||||
from urllib.request import urlopen
|
from urllib.request import urlopen
|
||||||
|
|
||||||
__version__ = "23.8a3"
|
__version__ = "23.8a3-dev"
|
||||||
|
|
||||||
|
|
||||||
class Spinner:
|
class Spinner:
|
||||||
|
@ -1882,7 +1882,7 @@ class Cli:
|
||||||
).update(
|
).update(
|
||||||
{
|
{
|
||||||
cmd: {
|
cmd: {
|
||||||
subcmd: {"help": help, "aliases": [subcmd[0]]}
|
subcmd: dict(description=help, aliases=[subcmd[0]])
|
||||||
for subcmd, help in subcmd_help
|
for subcmd, help in subcmd_help
|
||||||
}
|
}
|
||||||
for cmd, subcmd_help in (
|
for cmd, subcmd_help in (
|
||||||
|
@ -2019,7 +2019,9 @@ class Cli:
|
||||||
if subcmds:
|
if subcmds:
|
||||||
subcmd_p = self._get_subcmd_parser(cmd_p, cmd)
|
subcmd_p = self._get_subcmd_parser(cmd_p, cmd)
|
||||||
subcmd_cmd_p = subcmd_p.add_subparsers(
|
subcmd_cmd_p = subcmd_p.add_subparsers(
|
||||||
title="subcommand", metavar="<sub-cmd>", required=True
|
title="subcommand",
|
||||||
|
metavar="<sub-cmd>",
|
||||||
|
required=True,
|
||||||
)
|
)
|
||||||
for subcmd, kwargs in subcmds.items():
|
for subcmd, kwargs in subcmds.items():
|
||||||
subcmd_cmd_p.add_parser(
|
subcmd_cmd_p.add_parser(
|
||||||
|
|
Loading…
Reference in a new issue