.. _no-else-return: no-else-return / R1705 ====================== **Message emitted:** ``Unnecessary "%s" after "return", %s`` **Description:** *Used in order to highlight an unnecessary block of code following an if containing a return statement. As such, it will warn when it encounters an else following a chain of ifs, all of them containing a return statement.* **Problematic code:** .. literalinclude:: /data/messages/n/no-else-return/bad.py :language: python **Correct code:** .. literalinclude:: /data/messages/n/no-else-return/good.py :language: python Created by the `refactoring `__ checker.