From 1dd5a33da54f375df5dc4d6abc78819109fda46a Mon Sep 17 00:00:00 2001 From: imcompiling Date: Tue, 3 Sep 2024 16:04:33 -0400 Subject: [PATCH] Remove config param from get_quarter_name(). --- utils.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/utils.py b/utils.py index 9bcba93..d8495ea 100644 --- a/utils.py +++ b/utils.py @@ -69,7 +69,7 @@ def get_election_name() -> str: return f"vote-{get_datetime(current_cycle.term_start).year}-{current_cycle.name}" -def get_quarter_name(config: DakinySettings) -> str: +def get_quarter_name() -> str: """ Builds the name of the current cycle/quarter. @@ -79,8 +79,8 @@ def get_quarter_name(config: DakinySettings) -> str: Returns: str: the name of the cycle. """ - cycle = get_quarter_cycle(config) - current_cycle = config.election_cycles[cycle] + cycle = get_quarter_cycle(settings) + current_cycle = settings.election_cycles[cycle] return f"{get_datetime(current_cycle.term_start).year}-{current_cycle.name}" @@ -312,7 +312,7 @@ def record_event_points(config: DakinySettings, users: Sequence[str], add_points add_points (int): number of points to add is_member (bool): whether the users are a discord member or not """ - quarter_name = get_quarter_name(config) + quarter_name = get_quarter_name() with Session(engine) as session: for user in users: stmt = select(EventPoints).where(EventPoints.UserId == user).where(EventPoints.QuarterName == quarter_name) @@ -537,7 +537,7 @@ async def edit_clan_council_info(guild: nextcord.Guild, config: DakinySettings) f"<@{user_id}>" for user_id in council_member_ids if user_id not in (discord_manager, clan_leader) ] - quarter = get_quarter_name(config) + quarter = get_quarter_name() async with aiofiles.open(f"{TEMPLATES_DIR}/council_members.txt", encoding="utf8") as file: message = await file.read()