Chromium Code Reviews| Index: appengine/findit/crash/loglinear/feature.py |
| diff --git a/appengine/findit/crash/loglinear/feature.py b/appengine/findit/crash/loglinear/feature.py |
| index f1652373580b6450d75083b6dbed894e5c78268c..87159ab9d2d5ae0b49d7e23bb825ae72f4fc2ace 100644 |
| --- a/appengine/findit/crash/loglinear/feature.py |
| +++ b/appengine/findit/crash/loglinear/feature.py |
| @@ -114,7 +114,8 @@ class FeatureValue(Element): # pragma: no cover |
| @property |
| def reason(self): |
| - return self._reason |
| + return ('%s: %f -- %s' % (self._name, self._value, self._reason) |
| + if self._reason else None) |
|
chanli
2017/01/23 04:37:45
Since you already have name and value properties,
Sharu Jiang
2017/01/23 21:44:46
We want the reason string contains both name and v
|
| @property |
| def changed_files(self): |
| @@ -197,9 +198,7 @@ class MetaFeatureValue(MetaDict): |
| formatted_reasons = [] |
| for feature in self.itervalues(): |
| if feature.reason: |
| - formatted_reasons.append('%s: %f -- %s' % (feature.name, |
| - feature.value, |
| - feature.reason)) |
| + formatted_reasons.append(feature.reason) |
| formatted_reasons.sort() |
| self._reason = '\n'.join(formatted_reasons) |