Skip to content

Commit c7255fd

Browse files
committed
clean function name
1 parent 46c1948 commit c7255fd

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/officers/constants.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ def position_list() -> list[str]:
3030
return _OFFICER_POSITION_LIST
3131

3232
@staticmethod
33-
def position_length_in_semesters(position: str) -> int | None:
33+
def length_in_semesters(position: str) -> int | None:
34+
# TODO: ask the committee to maintain a json file with all the important details from the constitution
35+
# (I can create the version version of the file)
36+
"""How many semester position is active for, according to the CSSS Constitution"""
3437
return _LENGTH_MAP[position]
3538

3639
@staticmethod

src/officers/crud.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ async def create_new_officer_term(
217217
if new_officer_term.position not in OfficerPosition.position_list():
218218
raise HTTPException(status_code=500)
219219

220-
position_length = OfficerPosition.position_length_in_semesters(new_officer_term.position)
220+
position_length = OfficerPosition.length_in_semesters(new_officer_term.position)
221221
if position_length is not None:
222222
new_officer_term.end_date = semesters.step_semesters(
223223
semesters.current_semester_start(new_officer_term.start_date),

0 commit comments

Comments
 (0)