sonar/cli.py
def create(parser):
    """
    Parse the "create" argument

    Args:
        parser (argparse._SubParserAction): The parser object
    """
    subparser = parser.add_parser(
        "create", help="Manipulate the active repo", add_help=False
    )
    subsubparser = subparser.add_subparsers(
        title="Commands", metavar="command"
    )

    def ip():
        command = subsubparser.add_parser(
            "ip",
            help="Create an IP directory",
            add_help=False,
            description=textwrap.dedent(
                """\
                Adds an IP directory
                """
            ),
        )

        command_group = command.add_argument_group("Arguments")
        command_group.add_argument(
            "name",
            type=str,
            help="Name of the directory",
        )
        command.set_defaults(func=api.Create.ip)
        add_help(command)

    def f_repo():
        command = subsubparser.add_parser(
            "repo",
            help="Create an empty repo directory",
            add_help=False,
            description=textwrap.dedent(
                """\
                Create a repo directory
                """
            ),
        )

        command_group = command.add_argument_group("Arguments")
        command_group.add_argument(
            "name",
            type=str,
            help="Name of the repo",
        )
        command.set_defaults(func=api.Create.repo)
        add_help(command)

    ip()
    f_repo()
    add_help(subparser)

    Parse the "create" argument

    Args:
        parser (argparse._SubParserAction): The parser object
    
Parse the "create" argument
Parse the " create " argument
def create(parser):
    subparser = parser.add_parser(
        "create", help="Manipulate the active repo", add_help=False
    )
    subsubparser = subparser.add_subparsers(
        title="Commands", metavar="command"
    )
    def ip():
        command = subsubparser.add_parser(
            "ip",
            help="Create an IP directory",
            add_help=False,
            description=textwrap.dedent(
                """\
                Adds an IP directory
                """
            ),
        )
        command_group = command.add_argument_group("Arguments")
        command_group.add_argument(
            "name",
            type=str,
            help="Name of the directory",
        )
        command.set_defaults(func=api.Create.ip)
        add_help(command)
    def f_repo():
        command = subsubparser.add_parser(
            "repo",
            help="Create an empty repo directory",
            add_help=False,
            description=textwrap.dedent(
                """\
                Create a repo directory
                """
            ),
        )
        command_group = command.add_argument_group("Arguments")
        command_group.add_argument(
            "name",
            type=str,
            help="Name of the repo",
        )
        command.set_defaults(func=api.Create.repo)
        add_help(command)
    ip()
    f_repo()
    add_help(subparser)
def create ( parser ) : subparser = parser . add_parser ( "create" , help = "Manipulate the active repo" , add_help = False ) subsubparser = subparser . add_subparsers ( title = "Commands" , metavar = "command" ) def ip ( ) : command = subsubparser . add_parser ( "ip" , help = "Create an IP directory" , add_help = False , description = textwrap . dedent ( """\
                Adds an IP directory
                """ ) , ) command_group = command . add_argument_group ( "Arguments" ) command_group . add_argument ( "name" , type = str , help = "Name of the directory" , ) command . set_defaults ( func = api . Create . ip ) add_help ( command ) def f_repo ( ) : command = subsubparser . add_parser ( "repo" , help = "Create an empty repo directory" , add_help = False , description = textwrap . dedent ( """\
                Create a repo directory
                """ ) , ) command_group = command . add_argument_group ( "Arguments" ) command_group . add_argument ( "name" , type = str , help = "Name of the repo" , ) command . set_defaults ( func = api . Create . repo ) add_help ( command ) ip ( ) f_repo ( ) add_help ( subparser )
Parse the "create" argument
Parse the " create " argument
"""
    Parse the "create" argument

    Args:
        parser (argparse._SubParserAction): The parser object
    """
parser
The parser object
The parser object