sonar/main.py
def parse_args():
    """
    Defines the command-line argument parser. All the parsing functions are in
    the CLI module

    Returns:
        args: The parsed args
    """
    parser = argparse.ArgumentParser(
        prog="sonar",
        description="sonar is a tool to manage and test your hardware projects.",
        add_help=False,
    )
    parser.set_defaults(func=lambda x: parser.print_help())
    subparser = parser.add_subparsers(title="Commands", metavar="command")
    cli.activate(subparser)
    cli.board(subparser)
    cli.create(subparser)
    cli.database(subparser)
    cli.env(subparser)
    cli.init(subparser)
    cli.repo(subparser)
    cli.tool(subparser)

    command_group = parser.add_argument_group("Options")
    command_group.add_argument(
        "-h", "--help", action="help", help="show this help message and exit"
    )
    command_group.add_argument(
        "-v",
        "--version",
        action="version",
        version="%(prog)s " + sonar.__version__,
    )
    try:
        argcomplete.autocomplete(parser)
    except NameError:
        pass
    return parser.parse_args()

    Defines the command-line argument parser. All the parsing functions are in
    the CLI module

    Returns:
        args: The parsed args
    
Defines the command-line argument parser. All the parsing functions are in
the CLI module
Defines the command - line argument parser . All the parsing functions are in the CLI module
def parse_args():
    parser = argparse.ArgumentParser(
        prog="sonar",
        description="sonar is a tool to manage and test your hardware projects.",
        add_help=False,
    )
    parser.set_defaults(func=lambda x: parser.print_help())
    subparser = parser.add_subparsers(title="Commands", metavar="command")
    cli.activate(subparser)
    cli.board(subparser)
    cli.create(subparser)
    cli.database(subparser)
    cli.env(subparser)
    cli.init(subparser)
    cli.repo(subparser)
    cli.tool(subparser)
    command_group = parser.add_argument_group("Options")
    command_group.add_argument(
        "-h", "--help", action="help", help="show this help message and exit"
    )
    command_group.add_argument(
        "-v",
        "--version",
        action="version",
        version="%(prog)s " + sonar.__version__,
    )
    try:
        argcomplete.autocomplete(parser)
    except NameError:
        pass
    return parser.parse_args()
def parse_args ( ) : parser = argparse . ArgumentParser ( prog = "sonar" , description = "sonar is a tool to manage and test your hardware projects." , add_help = False , ) parser . set_defaults ( func = lambda x : parser . print_help ( ) ) subparser = parser . add_subparsers ( title = "Commands" , metavar = "command" ) cli . activate ( subparser ) cli . board ( subparser ) cli . create ( subparser ) cli . database ( subparser ) cli . env ( subparser ) cli . init ( subparser ) cli . repo ( subparser ) cli . tool ( subparser ) command_group = parser . add_argument_group ( "Options" ) command_group . add_argument ( "-h" , "--help" , action = "help" , help = "show this help message and exit" ) command_group . add_argument ( "-v" , "--version" , action = "version" , version = "%(prog)s " + sonar . __version__ , ) try : argcomplete . autocomplete ( parser ) except NameError : pass return parser . parse_args ( )
Defines the command-line argument parser.
Defines the command - line argument parser .
"""
    Defines the command-line argument parser. All the parsing functions are in
    the CLI module

    Returns:
        args: The parsed args
    """
The parsed args
The parsed args
args