Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(453)

Unified Diff: appengine/findit/crash/scorers/scorer.py

Issue 2157433002: [Findit] Pass changed files info to Fracas, 2 face design. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Fix nits. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: appengine/findit/crash/scorers/scorer.py
diff --git a/appengine/findit/crash/scorers/scorer.py b/appengine/findit/crash/scorers/scorer.py
index 20056036bbfbfd873200970d6bcd9b8b38c635d3..1dc68c87d2bbb266c2b2991a90263a6ddf31a7e4 100644
--- a/appengine/findit/crash/scorers/scorer.py
+++ b/appengine/findit/crash/scorers/scorer.py
@@ -16,11 +16,15 @@ class Scorer(object): # pragma: no cover.
raise NotImplementedError()
def Score(self, metric):
- """Score the result based on extracted metric."""
+ """Scores the result based on extracted metric."""
raise NotImplementedError()
def Reason(self, metric, score):
- """Given the reason of this score."""
+ """Gives the reason of this score."""
+ raise NotImplementedError()
+
+ def ChangedFiles(self, result):
+ """Returns the changed files info dict."""
raise NotImplementedError()
def __call__(self, result):
@@ -33,7 +37,8 @@ class Scorer(object): # pragma: no cover.
score = self.Score(metric)
reason = self.Reason(metric, score)
- return score, reason
+ changed_files = self.ChangedFiles(result)
+ return score, reason, changed_files
@property
def name(self):
« no previous file with comments | « appengine/findit/crash/scorers/min_distance.py ('k') | appengine/findit/crash/scorers/test/aggregated_scorer_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698