From 3916623c460351eccb016cf7e4a609629e09d805 Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Tue, 11 Oct 2022 16:22:10 -0700 Subject: [PATCH] remove multiple ands in conditional --- jc/cli.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jc/cli.py b/jc/cli.py index 67a851fa..b51d9646 100644 --- a/jc/cli.py +++ b/jc/cli.py @@ -399,8 +399,9 @@ class JcCli(): else: break - # if -h, -a, or -v found in options, then clear options and bail out - if 'h' in self.magic_options or 'a' in self.magic_options or 'v' in self.magic_options: + # if -a, -h, or -v found in options, then clear options and bail out + bail_opts = ('a', 'h', 'v') + if len({*bail_opts} & {*self.magic_options}): self.magic_options = [] return