We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 852f339 commit a99a17eCopy full SHA for a99a17e
examples/async_call.py
@@ -16,7 +16,7 @@ def run_async(coro) -> concurrent.futures.Future:
16
Await a coroutine from a synchronous function/method.
17
"""
18
19
- global _event_loop
+ global _event_loop # noqa: PLW0603
20
21
if _event_loop is None:
22
with _event_lock:
@@ -31,6 +31,7 @@ def run_async(coro) -> concurrent.futures.Future:
31
32
return asyncio.run_coroutine_threadsafe(coro, _event_loop)
33
34
+
35
async def async_wait(duration: float) -> float:
36
37
Example async function that is called from a synchronous cmd2 command
@@ -75,4 +76,5 @@ async def main() -> int:
75
76
77
if __name__ == '__main__':
78
import sys
79
80
sys.exit(asyncio.run(main(), debug=True))
0 commit comments