|
3 | 3 | import time |
4 | 4 | from enum import Enum |
5 | 5 | from pathlib import Path |
| 6 | +from typing import Any |
6 | 7 |
|
7 | 8 | import aiohttp |
8 | 9 | import bs4 |
@@ -65,7 +66,7 @@ async def class_search( |
65 | 66 | max_size: int = 1000, |
66 | 67 | sort_column: ClassColumn = ClassColumn.SUBJECT_DESCRIPTION, |
67 | 68 | sort_asc: bool = True, |
68 | | -) -> list[dict]: |
| 69 | +) -> list[dict[str, Any]]: |
69 | 70 | """ |
70 | 71 | Fetches the list of classes for a given subject and term from SIS. |
71 | 72 |
|
@@ -196,7 +197,9 @@ async def get_class_crosslists(session: aiohttp.ClientSession, term: str, crn: s |
196 | 197 |
|
197 | 198 |
|
198 | 199 | async def process_class_details( |
199 | | - session: aiohttp.ClientSession, course_data: dict, class_entry: dict |
| 200 | + session: aiohttp.ClientSession, |
| 201 | + course_data: dict[str, Any], |
| 202 | + class_entry: dict[str, Any], |
200 | 203 | ) -> None: |
201 | 204 | """ |
202 | 205 | Fetches and parses all details for a given class, populating the provided course |
@@ -292,7 +295,7 @@ async def get_course_data( |
292 | 295 | subject: str, |
293 | 296 | semaphore: asyncio.Semaphore = asyncio.Semaphore(1), |
294 | 297 | limit_per_host: int = 5, |
295 | | -) -> dict: |
| 298 | +) -> dict[str, dict[str, Any]]: |
296 | 299 | """ |
297 | 300 | Gets all course data for a given term and subject. |
298 | 301 |
|
@@ -342,7 +345,7 @@ async def get_term_data( |
342 | 345 | semaphore: asyncio.Semaphore = asyncio.Semaphore(10), |
343 | 346 | limit_per_host: int = 5, |
344 | 347 | output_path: Path | str = None, |
345 | | -) -> dict: |
| 348 | +) -> dict[str, dict[str, Any]]: |
346 | 349 | """ |
347 | 350 | Gets all course data for a given term, which includes all subjects in the term. |
348 | 351 |
|
|
0 commit comments