Skip to content

Commit 07484c8

Browse files
author
Itamar Shalev
committed
tldr: platform: Avoid duplicate code and manual os meantions
Signed-off-by: Itamar Shalev <[email protected]>
1 parent 0430d34 commit 07484c8

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tldr.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -597,12 +597,9 @@ def create_parser() -> ArgumentParser:
597597
nargs=1,
598598
default=None,
599599
type=str,
600-
choices=['android', 'freebsd', 'linux', 'netbsd', 'openbsd', 'osx', 'sunos',
601-
'windows', 'common'],
600+
choices=list(OS_DIRECTORIES),
602601
metavar='PLATFORM',
603-
help="Override the operating system "
604-
"[android, freebsd, linux, netbsd, openbsd,"
605-
" osx, sunos, windows, common]"
602+
help="Override the operating system " + str(list(OS_DIRECTORIES))
606603
)
607604

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

0 commit comments

Comments
 (0)