merge-converging-adjacent-guards
Adjacent if statements end in the same exit.
Why
Back-to-back guards that run the same exiting body are one decision split across branches; each copy must be kept in sync without changing behavior.
Fix
Join the conditions with or in their original order under one guard.
Examples
def select(closed, messages): if closed: return None if not messages: return None return messages[0]def select(closed, messages): if closed or not messages: return None return messages[0]