core/general: add assert_never + typing annotations for dataset
This commit is contained in:
parent
fd1a683d49
commit
7a1b7b1554
8 changed files with 54 additions and 19 deletions
|
@ -56,7 +56,7 @@ def _decode(s: str) -> str:
|
|||
|
||||
import json
|
||||
from typing import Union
|
||||
from ..core.error import Res
|
||||
from ..core import Res, assert_never
|
||||
def _entities() -> Iterator[Res[Union[User, _Message]]]:
|
||||
from ..core.kompress import ZipPath
|
||||
last = ZipPath(max(inputs()))
|
||||
|
@ -165,4 +165,4 @@ def messages() -> Iterator[Res[Message]]:
|
|||
user=user,
|
||||
)
|
||||
continue
|
||||
assert False, type(x) # should not happen
|
||||
assert_never(x)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue