Browse Source

WikiProjectTagger: Fix auto-assess when no current assessments.

tags/v0.3
Ben Kurtovic 7 years ago
parent
commit
cc574cec6d
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      earwigbot/tasks/wikiproject_tagger.py

+ 2
- 2
earwigbot/tasks/wikiproject_tagger.py View File

@@ -350,8 +350,8 @@ class WikiProjectTagger(Task):
classes[value] += 1 classes[value] += 1


values = tuple(classes.values()) values = tuple(classes.values())
if values:
best = max(values)
best = max(values)
if best:
confidence = float(best) / sum(values) confidence = float(best) / sum(values)
if confidence > 0.75: if confidence > 0.75:
rank = tuple(classes.keys())[values.index(best)] rank = tuple(classes.keys())[values.index(best)]


Loading…
Cancel
Save