Skip to content

Commit 8f54f45

Browse files
author
Itamar Shalev
committed
tldr: platform: allow only original values
Signed-off-by: Itamar Shalev <[email protected]>
1 parent 06355c2 commit 8f54f45

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tldr.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -593,14 +593,17 @@ def create_parser() -> ArgumentParser:
593593
action='store_true',
594594
help="Delete the local cache of pages and exit")
595595

596+
all_platforms = sorted(set(OS_DIRECTORIES.values()))
597+
platforms_str = "[" + ", ".join(all_platforms) + "]"
598+
596599
parser.add_argument(
597600
'-p', '--platform',
598601
nargs=1,
599602
default=None,
600603
type=str,
601-
choices=list(OS_DIRECTORIES),
604+
choices=all_platforms,
602605
metavar='PLATFORM',
603-
help="Override the operating system " + str(list(OS_DIRECTORIES))
606+
help=f"Override the operating system {platforms_str}"
604607
)
605608

606609
parser.add_argument('-l', '--list',

0 commit comments

Comments
 (0)