Skip to content

Commit

Permalink
Ruff formatted
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipTzannis committed Sep 5, 2024
1 parent 9527c88 commit 4b47be7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions games/achievements.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,16 +191,15 @@ def get_level(user):

class TheMoreTheMerrierAchievement(Achievement):
name = "The More The Merrier"
description = (
"Play atleast 5/10/15/20 games with as many different players"
)
description = "Play atleast 5/10/15/20 games with as many different players"
icon = "merrier.svg"

def get_level(user):
played_with_count = Counter()
for game in user.games.filter():
for player in game.players.all():
if player != user:
played_with_count[player.username] += 1
played_with_count[player.username] += 1

top20 = sorted(
({"x": k, "y": v} for k, v in played_with_count.items()),
Expand All @@ -219,6 +218,7 @@ def get_level(user):
else:
return AchievementLevel.NO_LEVEL


class PilfingerAchievement(Achievement):
name = "Pilfinger"
description = "Stille stille stille, Pille pille pille"
Expand Down

0 comments on commit 4b47be7

Please sign in to comment.