Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def getUpdatedTemperature(self):
self.assessTemperature()
ruleWeakness = 100.0
if self.rule:
self.rule.updateStrength()
ruleWeakness = 100.0 - self.rule.totalStrength
values = ((self.totalUnhappiness, 0.8), (ruleWeakness, 0.2))
return formulas.weightedAverage(values)