增加环绕侦察场景适配

This commit is contained in:
2026-01-08 15:44:38 +08:00
parent 3eba1f962b
commit 10c5bb5a8a
5441 changed files with 40219 additions and 379695 deletions

View File

@@ -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]: