Skip to content

Commit 008efed

Browse files
committed
ruff: Fix SIM300 Yoda conditions are discouraged.
Signed-off-by: Anders Kaseorg <[email protected]>
1 parent 8b5b395 commit 008efed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

zulip/integrations/zephyr/zephyr_mirror_backend.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,11 +1219,11 @@ def parse_args() -> Tuple[optparse.Values, List[str]]:
12191219

12201220

12211221
def die_gracefully(signal: int, frame: Optional[FrameType]) -> None:
1222-
if CURRENT_STATE == States.ZulipToZephyr:
1222+
if States.ZulipToZephyr == CURRENT_STATE:
12231223
# this is a child process, so we want os._exit (no clean-up necessary)
12241224
os._exit(1)
12251225

1226-
if CURRENT_STATE == States.ZephyrToZulip and not options.use_sessions:
1226+
if States.ZephyrToZulip == CURRENT_STATE and not options.use_sessions:
12271227
try:
12281228
# zephyr=>zulip processes may have added subs, so run ZCancelSubscriptions
12291229
zephyr_ctypes.check(zephyr_ctypes.ZCancelSubscriptions(0))

0 commit comments

Comments
 (0)