Skip to content

Commit 23cce57

Browse files
authored
Simplify TLDR_OPTIONS if statement (#286)
1 parent 154ba58 commit 23cce57

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

tldr.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -670,13 +670,12 @@ def main() -> None:
670670
options = parser.parse_args()
671671

672672
display_option_length = "long"
673-
if not (options.short_options or options.long_options):
674-
if os.environ.get('TLDR_OPTIONS') == "short":
675-
display_option_length = "short"
676-
elif os.environ.get('TLDR_OPTIONS') == "long":
677-
display_option_length = "long"
678-
elif os.environ.get('TLDR_OPTIONS') == "both":
679-
display_option_length = "both"
673+
if os.environ.get('TLDR_OPTIONS') == "short":
674+
display_option_length = "short"
675+
elif os.environ.get('TLDR_OPTIONS') == "long":
676+
display_option_length = "long"
677+
elif os.environ.get('TLDR_OPTIONS') == "both":
678+
display_option_length = "both"
680679
if options.short_options:
681680
display_option_length = "short"
682681
if options.long_options:

0 commit comments

Comments
 (0)