Skip to content

Commit

Permalink
Always print summary score
Browse files Browse the repository at this point in the history
  • Loading branch information
javatarz committed Oct 6, 2019
1 parent 604bca9 commit 0c7cdc9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/models/user_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ def __init__(self, user_id, prs, score):
self._score = score

def leaderboard_data(self) -> str:
return f"{self._user_id} - Score: {self._score} (PRs: {len(self._prs)})"
return f"User: {self._user_id} - Score: {self._score} (PRs: {len(self._prs)})"

def prs_data(self) -> str:
pr_summaries = [f" {pr.summary()}" for pr in self._prs]
new_line = '\n'
pr_summary_data = new_line.join(pr_summaries)

return f"User: {self._user_id}{new_line}{pr_summary_data}{new_line}"
return f"User: {self._user_id} - Score: {self._score}{new_line}{pr_summary_data}{new_line}"

def all_data(self) -> str:
return self.prs_data()

0 comments on commit 0c7cdc9

Please sign in to comment.