unreachable / W0101#

Message emitted:

Unreachable code

Description:

Used when there is some code behind a "return" or "raise" statement, which will never be accessed.

Correct code:

def say_hello():
    print("Hello World!, Inside function.")
    return True

Problematic code:

def say_hello():
    return True
    print("Hello World!, Outside function.")  # [unreachable]

Created by the basic checker.