增加环绕侦察场景适配

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

@@ -12,9 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import asyncio
import contextlib
import functools
import inspect
from typing import TYPE_CHECKING, Callable, Generic, Iterator, TypeVar
V = TypeVar("V")
@@ -63,7 +63,7 @@ class _AgnosticContextManager(
raise RuntimeError("generator didn't yield") from None
def __call__(self, func: V) -> V: # pyright: ignore [reportIncompatibleMethodOverride]
if asyncio.iscoroutinefunction(func):
if inspect.iscoroutinefunction(func):
@functools.wraps(func) # type: ignore
async def async_wrapper(*args: Pargs, **kwargs: Pkwargs) -> R: # pyright: ignore [reportInvalidTypeVarUse]