|
5 | 5 | import re |
6 | 6 | from typing import Any |
7 | 7 |
|
| 8 | + |
8 | 9 | def parse_subject_page( |
9 | | - html: str, data: dict[str, dict[str, Any]], include_ratings: bool = False, ratings_cache: dict[str, dict[str, int] | None] = {} |
| 10 | + html: str, |
| 11 | + data: dict[str, dict[str, Any]], |
| 12 | + include_ratings: bool = False, |
| 13 | + ratings_cache: dict[str, dict[str, int] | None] = {}, |
10 | 14 | ) -> dict[str, str]: |
11 | 15 | soup = BeautifulSoup(html, "html.parser") |
12 | 16 | table_rows = soup.find_all("tr", class_=["odd", "even"]) |
@@ -72,7 +76,9 @@ def parse_crn_page(html: str, data: dict[str, dict[str, Any]]) -> None: |
72 | 76 |
|
73 | 77 |
|
74 | 78 | def get_instructors( |
75 | | - instructors_str: str, include_ratings: bool, ratings_cache: dict[str, dict[str, int] | None] |
| 79 | + instructors_str: str, |
| 80 | + include_ratings: bool, |
| 81 | + ratings_cache: dict[str, dict[str, int] | None], |
76 | 82 | ) -> list[dict[str, Any]] | None: |
77 | 83 | if instructors_str == "STAFF": |
78 | 84 | return None |
@@ -133,7 +139,9 @@ def get_max_enroll(td: Tag) -> str: |
133 | 139 | span = td.contents[0] |
134 | 140 |
|
135 | 141 | if not isinstance(span, Tag): |
136 | | - raise Exception("Max enrollment HTML span tag inside td not structured as expected") |
| 142 | + raise Exception( |
| 143 | + "Max enrollment HTML span tag inside td not structured as expected" |
| 144 | + ) |
137 | 145 |
|
138 | 146 | title_attr = span.attrs["title"] |
139 | 147 |
|
|
0 commit comments