using assert_never()

This commit is contained in:
Maxim Devaev 2025-05-17 23:13:01 +03:00
parent 47614a5724
commit 193eaa48c8

View File

@ -24,6 +24,7 @@ import asyncio
import contextlib import contextlib
import struct import struct
import typing
from typing import Callable from typing import Callable
from typing import AsyncGenerator from typing import AsyncGenerator
@ -71,7 +72,7 @@ class _AuthApiPart(_BaseApiPart):
if ex.status in [400, 401, 403]: if ex.status in [400, 401, 403]:
return False return False
raise raise
raise RuntimeError("We should't be here") typing.assert_never("We should't be here")
class _StreamerApiPart(_BaseApiPart): class _StreamerApiPart(_BaseApiPart):