feat(doc): make docs more concise
This commit is contained in:
parent
3edc3db8aa
commit
0dd145b71e
5 changed files with 58 additions and 196 deletions
|
|
@ -99,7 +99,6 @@ def scrape_contest_problems(contest_id: str) -> list[ProblemSummary]:
|
|||
if problem:
|
||||
problems.append(problem)
|
||||
|
||||
problems.sort(key=lambda x: x.id)
|
||||
return problems
|
||||
|
||||
except Exception as e:
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ def scrape_contest_problems(contest_id: str) -> list[ProblemSummary]:
|
|||
ProblemSummary(id=problem_letter, name=problem_name)
|
||||
)
|
||||
|
||||
problems.sort(key=lambda x: x.id)
|
||||
# Preserve contest order - do not sort
|
||||
|
||||
seen: set[str] = set()
|
||||
unique_problems: list[ProblemSummary] = []
|
||||
|
|
|
|||
|
|
@ -114,7 +114,6 @@ def scrape_category_problems(category_id: str) -> list[ProblemSummary]:
|
|||
|
||||
problems.append(ProblemSummary(id=problem_id, name=problem_name))
|
||||
|
||||
problems.sort(key=lambda x: int(x.id))
|
||||
return problems
|
||||
|
||||
except Exception as e:
|
||||
|
|
@ -263,8 +262,7 @@ def scrape_all_problems() -> dict[str, list[ProblemSummary]]:
|
|||
problem = ProblemSummary(id=problem_id, name=problem_name)
|
||||
all_categories[current_category].append(problem)
|
||||
|
||||
for category in all_categories:
|
||||
all_categories[category].sort(key=lambda x: int(x.id))
|
||||
# Preserve HTML document order - do not sort
|
||||
|
||||
print(
|
||||
f"Found {len(all_categories)} categories with {sum(len(probs) for probs in all_categories.values())} problems",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue