Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 1.26 KB

File metadata and controls

44 lines (30 loc) · 1.26 KB
Root.Redundancy.UnreachableCode.UnreachableStatement Parent Index
Sibling aspects UnusedFunction

UnreachableStatement

An unreachable statement is a statement that is never executed during code execution.

Subaspects

This aspect does not have any sub aspects.

Example

def func():
    return True

if func():
    a = {}
else:
    a = (i for i in range (5))
    print (id(a))

Importance

We should always keep our codebase clean, having dead code uselessly makes the code longer and ambiguous.

How to fix this

These statement can be remove without harming the code.