Skip to content

Commit 149becf

Browse files
Apply suggestions from code review
Co-authored-by: lemonyte <[email protected]>
1 parent 1486d58 commit 149becf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

bot/exts/advent_of_code/_cog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ async def completionist_task(self) -> None:
107107
placement_leaderboard = json.loads(leaderboard["placement_leaderboard"])
108108

109109
for member_aoc_info in placement_leaderboard.values():
110-
if member_aoc_info["stars"] <= _helpers.STARS_THIS_YEAR:
110+
if member_aoc_info["stars"] < _helpers.STARS_THIS_YEAR:
111111
# Only give the role to people who have completed all stars for this year
112112
continue
113113

bot/exts/advent_of_code/_helpers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@
5858

5959
# In 2025, AOC was changed to be held from Dec 1 to 12, with 12 days rather than 25.
6060
# This implementation is done in such a way that any arbitary number of days can be supported.
61-
def days_in_year(year:int | None = None) -> int:
61+
def days_in_year(year: int | None = None) -> int:
6262
"""Return the number of days in the current Advent of Code year."""
6363
if year is None:
6464
year = AdventOfCode.year
6565
return 25 if year < 2025 else 12
6666

6767
DAYS_THIS_YEAR = days_in_year()
68-
STARS_THIS_YEAR = DAYS_THIS_YEAR
68+
STARS_THIS_YEAR = DAYS_THIS_YEAR * 2
6969

7070
class UnexpectedRedirect(aiohttp.ClientError):
7171
"""Raised when an unexpected redirect was detected."""

0 commit comments

Comments
 (0)