Move impact_included method into Axe class
Closed this issue · 0 comments
m8ttyB commented
Move the impact_included method into the Axe class. Nit, update the method to accept data['violations'] and simplify line 17.
def impact_included(rule, impact):
if impact == 'minor' or impact is None:
return True
elif impact == 'moderate':
if rule['impact'] != 'minor':
return True
elif impact == 'severe':
if rule['impact'] == 'severe' or rule['impact'] == 'critical':
return True
elif impact == 'critical':
if rule['impact'] == 'critical':
return True
else:
return False