Screenshot: Fix argument defaults

This commit is contained in:
Akemi Izuko 2023-12-23 20:14:02 -07:00
parent 25d90b627c
commit f0e58f702e
Signed by: akemi
GPG key ID: 8DE0764E1809E9FC

View file

@ -240,7 +240,6 @@ def parse_tar(s: str) -> Path:
else: else:
raise Exception(f"{s} is not a path to a .{{tar,tgz,tar.gz}} file") raise Exception(f"{s} is not a path to a .{{tar,tgz,tar.gz}} file")
parser = argparse.ArgumentParser( parser = argparse.ArgumentParser(
prog="Screenshot Wayland v1.0.0", prog="Screenshot Wayland v1.0.0",
description='Take a screenshot on Sway' description='Take a screenshot on Sway'
@ -345,14 +344,16 @@ archive_subcmd = subcommands.add_parser(
archive_subcmd.add_argument( archive_subcmd.add_argument(
'-e', '--extension', '-e', '--extension',
type=str, type=str,
default=DEFAULT_EDIT_EXTENSION,
metavar="<ext>", metavar="<ext>",
help='Change image extension and image type backed up', help='Change image extension and image type backed up',
); );
archive_subcmd.add_argument( archive_subcmd.add_argument(
'-q', '--quality', '-q', '--quality',
type=parse_percent, type=parse_percent,
default=DEFAULT_EDIT_QUALITY,
metavar='<N%>', metavar='<N%>',
help='Set quality of new image. [0, 100], higher means bigger file', help='Set quality of backed up images. [0, 100], higher means bigger file',
); );
archive_subcmd.add_argument( archive_subcmd.add_argument(
'which', metavar='<which>', 'which', metavar='<which>',