Skip to content

Commit

Permalink
fix: fix student_id type annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
qwqVictor committed Mar 5, 2023
1 parent af9ed16 commit b4457ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cqupt_ics/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def fold_line(text: str):
ret += text
return ret

async def get_events(student_id: int, mode: int, enable_geo: bool = True, provider: providers.ProviderBaseType = providers.RedrockProvider, start_day: datetime = datetime(1970, 1, 1)):
async def get_events(student_id: str, mode: int, enable_geo: bool = True, provider: providers.ProviderBaseType = providers.RedrockProvider, start_day: datetime = datetime(1970, 1, 1)):
runtime = datetime.now().strftime('%Y%m%dT%H%M%SZ')
now_week = 0
classes = []
Expand Down Expand Up @@ -140,7 +140,7 @@ async def get_events(student_id: int, mode: int, enable_geo: bool = True, provid
"""
yield single_event

async def get_ics(student_id: int, mode: int, enable_geo: bool = True, provider: providers.ProviderBaseType = providers.RedrockProvider, start_day: datetime = datetime(1970, 1, 1)):
async def get_ics(student_id: str, mode: int, enable_geo: bool = True, provider: providers.ProviderBaseType = providers.RedrockProvider, start_day: datetime = datetime(1970, 1, 1)):
iCal = ICS_HEADER
async for event in get_events(student_id=student_id, mode=mode, enable_geo=enable_geo, provider=provider, start_day=start_day):
iCal += event
Expand Down

0 comments on commit b4457ee

Please sign in to comment.