Pattern: Unreachable code
Issue: -
Unreachable code can never be executed because there exists no control flow path to the code from the rest of the program. It is generally considered undesirable for a number of reasons, including increased code size and increased time and effort for maintenance. Consider deleting unused code to resolve this issue.
Example of incorrect code:
def func():
return 1
print('unreachable')
Example of correct code:
def func():
return 1