File: __main__.py

package info (click to toggle)
azure-cli 2.83.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,346,000 kB
  • sloc: python: 1,930,197; sh: 1,344; makefile: 407; cs: 145; javascript: 74; sql: 37; xml: 21
file content (31 lines) | stat: -rw-r--r-- 939 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------

import argparse
import sys
import automation.verify
import automation.style
import automation.tests
import automation.cli_linter


def main():
    parser = argparse.ArgumentParser(prog='azdev')

    sub_parser = parser.add_subparsers(title='sub commands')
    automation.verify.init_args(sub_parser)
    automation.style.init_args(sub_parser)
    automation.tests.init_args(sub_parser)
    automation.cli_linter.init_args(sub_parser)

    if sys.argv[1:]:
        args = parser.parse_args()
        args.func(args)
    else:
        parser.print_help()


if __name__ == '__main__':
    main()