Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def get_args():
# parse args
parser = ArgumentParser(prog='zdict')
parser.add_argument(
'words',
metavar='word',
type=str,
nargs='*',
help='Words for searching its translation'
)
parser.add_argument(
"-v", "--version",
action="version",
version='%(prog)s-' + constants.VERSION
)
parser.add_argument(
"-d", "--disable-db-cache",
default=False,
action="store_true",
help="Temporarily not using the result from db cache.\
(still save the result into db)"
)
parser.add_argument(
"-t", "--query-timeout",
type=float,
default=5.0,
action="store",
help="Set timeout for every query. default is 5 seconds."
def get_args():
# parse args
parser = ArgumentParser(prog='zdict')
parser.add_argument(
'words',
metavar='word',
type=str,
nargs='*',
help='Words for searching its translation'
)
parser.add_argument(
"-v", "--version",
action="version",
version='%(prog)s-' + constants.VERSION
)
parser.add_argument(
"-d", "--disable-db-cache",
default=False,
action="store_true",
help="Temporarily not using the result from db cache.\
(still save the result into db)"
)
parser.add_argument(
"-t", "--query-timeout",
type=float,
default=5.0,
action="store",
help="Set timeout for every query. default is 5 seconds."