general: move assert_never to my.core.compat as it's in stdlib from 3.11
rely on typing-extensions for fallback introducing typing-extensions dependency without fallback, should be ok since it's in the top 10 of popular packages
This commit is contained in:
parent
1317914bff
commit
a7439c7846
10 changed files with 36 additions and 16 deletions
|
@ -6,7 +6,6 @@ from pathlib import Path
|
|||
from typing import Dict, Iterator, Sequence
|
||||
|
||||
from my.core import get_files, Res, datetime_aware
|
||||
from my.core.common import assert_never
|
||||
|
||||
from my.config import codeforces as config # type: ignore[attr-defined]
|
||||
|
||||
|
@ -73,7 +72,7 @@ class Parser:
|
|||
# these contain only contests the user participated in
|
||||
yield from self._parse_competitions(path)
|
||||
else:
|
||||
raise RuntimeError("shouldn't happen") # TODO switch to compat.assert_never
|
||||
raise RuntimeError(f"shouldn't happen: {path.name}")
|
||||
|
||||
|
||||
def data() -> Iterator[Res[Competition]]:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue