Skip to content

Commit c0b74d7

Browse files
committed
🔧 Update async_eval version
1 parent 7b8c4e2 commit c0b74d7

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

helpers/poetry.lock

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/java/com/uriyyo/evaluate_async_code/AsyncPyDebugUtils.kt

+4-4
Original file line numberDiff line numberDiff line change
@@ -356,16 +356,16 @@ except NameError: # pragma: no cover
356356
try:
357357
from trio._core._run import GLOBAL_RUN_CONTEXT
358358
359-
def is_trio_running() -> bool:
360-
return hasattr(GLOBAL_RUN_CONTEXT, "runner")
359+
def is_trio_not_running() -> bool:
360+
return not hasattr(GLOBAL_RUN_CONTEXT, "runner")
361361
362362
363363
except ImportError: # pragma: no cover
364-
is_trio_running = _noop
364+
is_trio_not_running = _noop
365365
366366
367367
def verify_async_debug_available() -> None:
368-
if is_trio_running():
368+
if not is_trio_not_running():
369369
raise RuntimeError(
370370
"Can not evaluate async code with trio event loop. "
371371
"Only native asyncio event loop can be used for async code evaluating."

0 commit comments

Comments
 (0)