Formatting defaults in help messages come from Format().

This commit is contained in:
Chris Berkhout 2021-05-27 17:29:58 +02:00
parent c4df91d066
commit 83e3ebc599

View file

@ -309,26 +309,27 @@ def build_parser():
type=str, type=str,
help="rename quote symbol", help="rename quote symbol",
) )
default_fmt = Format()
fetch_parser.add_argument( fetch_parser.add_argument(
"--rename-time", "--rename-time",
dest="renametime", dest="renametime",
metavar="TIME", metavar="TIME",
type=str, type=str,
help="set a particular time of day (default: 00:00:00)", help=f"set a particular time of day (default: {default_fmt.time})",
) )
fetch_parser.add_argument( fetch_parser.add_argument(
"--format-decimal", "--format-decimal",
dest="formatdecimal", dest="formatdecimal",
metavar="CHAR", metavar="CHAR",
type=str, type=str,
help="decimal point (default: '.')", help=f"decimal point (default: '{default_fmt.decimal}')",
) )
fetch_parser.add_argument( fetch_parser.add_argument(
"--format-thousands", "--format-thousands",
dest="formatthousands", dest="formatthousands",
metavar="CHAR", metavar="CHAR",
type=str, type=str,
help="thousands separator (default: '')", help=f"thousands separator (default: '{default_fmt.thousands}')",
) )
fetch_parser.add_argument( fetch_parser.add_argument(
"--format-symbol", "--format-symbol",
@ -336,14 +337,14 @@ def build_parser():
metavar="LOC", metavar="LOC",
type=str, type=str,
choices=["rightspace", "right", "leftspace", "left"], choices=["rightspace", "right", "leftspace", "left"],
help="commodity symbol placement (default: rightspace)", help=f"commodity symbol placement (default: {default_fmt.symbol})",
) )
fetch_parser.add_argument( fetch_parser.add_argument(
"--format-datesep", "--format-datesep",
dest="formatdatesep", dest="formatdatesep",
metavar="CHAR", metavar="CHAR",
type=str, type=str,
help="date separator (default: '-')", help=f"date separator (default: '{default_fmt.datesep}')",
) )
return parser return parser