Unreachable code
607 """
608 return ## FIXME: BREAK RULES oin advance of UPDATING them 2019
609
610 def apply_step_rules(rules, isStopOnFirstApplied):611 for t in t_range:
612 if GEARS[t - 1] != GEARS[t]: ## All rules triggered by a gear-shift.
613 for rule in rules:
Description
This statement is unreachable, as the control flow will never reach upto this point. Consider removing this part of code or re-evaluating the control flow.
Bad practice
def count_pairs(users):
pairs = 0
for user in users:
if user.type == "student":
pairs += 1
return pairs
pairs /= 2 # <-- Unreachable
Preferred
def count_pairs(users):
pairs = 0
for user in users:
if user.type == "student":
pairs += 1
pairs /= 2
return pairs