ruff: Fix PLR1714 Consider merging multiple comparisons.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit 2ae285af7c)
This commit is contained in:
Anders Kaseorg
2023-07-21 16:15:10 -07:00
committed by Alex Vandiver
parent b9aa772885
commit 91e5ef39eb
18 changed files with 41 additions and 56 deletions

View File

@@ -101,7 +101,7 @@ if not args.noop and not args.force:
sys.stdout.write("Apply changes? [y/N] ")
sys.stdout.flush()
do_apply = sys.stdin.readline().strip().lower()
if do_apply == "" or do_apply == "n":
if do_apply in ("", "n"):
sys.exit(0)
if args.noop and args.force:
@@ -115,5 +115,5 @@ ret = subprocess.call([*puppet_cmd, "--detailed-exitcodes"], env=puppet_env)
# ret = 2 => changes, no errors
# ret = 4 => no changes, yes errors
# ret = 6 => changes, yes errors
if ret != 0 and ret != 2:
if ret not in (0, 2):
sys.exit(2)