Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def main():
argument_parser = ArgumentParser(description='keyvi')
argument_parser.add_argument('-v', '--version', action='version', version=keyvi.__version__)
subparsers = argument_parser.add_subparsers(dest='command')
stats_parser = subparsers.add_parser('stats')
stats_parser.add_argument('input_file', type=str, metavar='FILE')
dump_parser = subparsers.add_parser('dump')
dump_parser.add_argument('input_file', type=str, metavar='FILE')
dump_parser.add_argument('output_file', type=str, metavar='OUT_FILE')
dump_parser.add_argument('-j', '--json-dumps', action='store_true',
help='wrap values with json.dumps()')
compile_parser = subparsers.add_parser('compile')
compile_parser.add_argument('input_file', type=str, metavar='FILE')
compile_parser.add_argument('output_file', type=str, metavar='OUT_FILE')
compile_parser.add_argument('dict_type', type=str, choices=['json', 'string', 'int', 'completion', 'key-only'],