mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 04:23:46 +00:00
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:
committed by
Alex Vandiver
parent
b9aa772885
commit
91e5ef39eb
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user