(name: str)
| 29 | |
| 30 | |
| 31 | def extract_id(name: str) -> int: |
| 32 | match = re.match(r"^(\d+)_", name) |
| 33 | if not match: |
| 34 | raise ValueError(f"Directory name must start with number: {name}") |
| 35 | return int(match.group(1)) |
| 36 | |
| 37 | |
| 38 | def get_difficulty(path: Path) -> str: |