mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 00:51:53 +08:00
using assert_never()
This commit is contained in:
@@ -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):
|
||||||
|
|||||||
Reference in New Issue
Block a user