From 008efed12b9b25c4e80a1eee068259a210956e15 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Sun, 29 Oct 2023 17:30:08 -0700 Subject: [PATCH] ruff: Fix SIM300 Yoda conditions are discouraged. Signed-off-by: Anders Kaseorg --- zulip/integrations/zephyr/zephyr_mirror_backend.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zulip/integrations/zephyr/zephyr_mirror_backend.py b/zulip/integrations/zephyr/zephyr_mirror_backend.py index 3e13f618..ec261da2 100755 --- a/zulip/integrations/zephyr/zephyr_mirror_backend.py +++ b/zulip/integrations/zephyr/zephyr_mirror_backend.py @@ -1219,11 +1219,11 @@ def parse_args() -> Tuple[optparse.Values, List[str]]: def die_gracefully(signal: int, frame: Optional[FrameType]) -> None: - if CURRENT_STATE == States.ZulipToZephyr: + if States.ZulipToZephyr == CURRENT_STATE: # this is a child process, so we want os._exit (no clean-up necessary) os._exit(1) - if CURRENT_STATE == States.ZephyrToZulip and not options.use_sessions: + if States.ZephyrToZulip == CURRENT_STATE and not options.use_sessions: try: # zephyr=>zulip processes may have added subs, so run ZCancelSubscriptions zephyr_ctypes.check(zephyr_ctypes.ZCancelSubscriptions(0))