mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 16:18:30 +00:00
Fix lint issues in asyncio_utils.py
- Remove trailing whitespace from blank lines - Remove unused loop variable Co-Authored-By: João <joao@crewai.com>
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
"""Utilities for handling asyncio operations safely across different contexts."""
|
||||
|
||||
import asyncio
|
||||
from typing import Any, Coroutine
|
||||
from collections.abc import Coroutine
|
||||
from typing import Any
|
||||
|
||||
|
||||
def run_coroutine_sync(coro: Coroutine) -> Any:
|
||||
@@ -22,11 +23,10 @@ def run_coroutine_sync(coro: Coroutine) -> Any:
|
||||
Any exception raised by the coroutine
|
||||
"""
|
||||
try:
|
||||
loop = asyncio.get_running_loop()
|
||||
asyncio.get_running_loop()
|
||||
except RuntimeError:
|
||||
return asyncio.run(coro)
|
||||
else:
|
||||
import concurrent.futures
|
||||
import threading
|
||||
|
||||
result = None
|
||||
|
||||
Reference in New Issue
Block a user