-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
questionAsking for support or clarificationAsking for support or clarification
Description
Summary
if-with-same-arms (SIM114) does not trigger for a branch where the only difference is a comment:
while True:
rc = win32event.MsgWaitForMultipleObjects(
(StopEvent,), 0, TIMEOUT, win32event.QS_ALLEVENTS
)
if rc == win32event.WAIT_OBJECT_0:
break
elif rc == win32event.WAIT_OBJECT_0 + 1 and pythoncom.PumpWaitingMessages():
break # wm_quit(remove vm_quit and it'll trigger)
This should of course count as an unsafe-fix (#19576), but should still trigger the rule.
Version
0.11 (but I also tried with uvx ruff@0.15 check --select=SIM114
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
questionAsking for support or clarificationAsking for support or clarification