增加环绕侦察场景适配
This commit is contained in:
@@ -7,16 +7,15 @@ import json
|
||||
import math
|
||||
import sys
|
||||
import warnings
|
||||
from collections.abc import Awaitable, Generator, Iterable, Mapping, MutableMapping, Sequence
|
||||
from collections.abc import Awaitable, Callable, Generator, Iterable, Mapping, MutableMapping, Sequence
|
||||
from concurrent.futures import Future
|
||||
from contextlib import AbstractContextManager
|
||||
from types import GeneratorType
|
||||
from typing import (
|
||||
Any,
|
||||
Callable,
|
||||
Literal,
|
||||
TypedDict,
|
||||
Union,
|
||||
TypeGuard,
|
||||
cast,
|
||||
)
|
||||
from urllib.parse import unquote, urljoin
|
||||
@@ -30,11 +29,6 @@ from starlette._utils import is_async_callable
|
||||
from starlette.types import ASGIApp, Message, Receive, Scope, Send
|
||||
from starlette.websockets import WebSocketDisconnect
|
||||
|
||||
if sys.version_info >= (3, 10): # pragma: no cover
|
||||
from typing import TypeGuard
|
||||
else: # pragma: no cover
|
||||
from typing_extensions import TypeGuard
|
||||
|
||||
if sys.version_info >= (3, 11): # pragma: no cover
|
||||
from typing import Self
|
||||
else: # pragma: no cover
|
||||
@@ -55,7 +49,7 @@ ASGI2App = Callable[[Scope], ASGIInstance]
|
||||
ASGI3App = Callable[[Scope, Receive, Send], Awaitable[None]]
|
||||
|
||||
|
||||
_RequestData = Mapping[str, Union[str, Iterable[str], bytes]]
|
||||
_RequestData = Mapping[str, str | Iterable[str] | bytes]
|
||||
|
||||
|
||||
def _is_asgi3(app: ASGI2App | ASGI3App) -> TypeGuard[ASGI3App]:
|
||||
|
||||
Reference in New Issue
Block a user