duplicate-adjacent-exception-handler
Adjacent exception handlers repeat the same executable translation.
Why
Repeating one translation for adjacent statically known exception classes creates extra branches to maintain without different behavior.
Fix
Consider one tuple handler for the adjacent exception types. Preserve distinct messages, cleanup, ordering, and intentional independently maintained translations.
Examples
try: action()except ValueError as error: raise RuntimeError("invalid") from errorexcept TypeError as error: raise RuntimeError("invalid") from errortry: action()except (ValueError, TypeError) as error: raise RuntimeError("invalid") from error